Questions tagged [multiline]

Text that spans more than one line is considered "multiline". Concerns about wrapping, spacing, techniques and best practices.

Text that spans more than one line is considered "multiline". Concerns about wrapping, spacing, techniques and best practices, as well as language and platform-specific techniques for displaying text in a multiline format.

1709 questions
2940
votes
39 answers

Creating multiline strings in JavaScript

I have the following code in Ruby. I want to convert this code into JavaScript. What is the equivalent code in JS? text = <<"HERE" This Is A Multiline String HERE
Newy
  • 34,169
  • 9
  • 40
  • 55
1530
votes
26 answers

Pythonic way to create a long multi-line string

I have a very long query. I would like to split it in several lines in Python. A way to do it in JavaScript would be using several sentences and joining them with a + operator (I know, maybe it's not the most efficient way to do it, but I'm not…
Pablo Mescher
  • 21,069
  • 6
  • 28
  • 31
775
votes
9 answers

Are multi-line strings allowed in JSON?

Is it possible to have multi-line strings in JSON? It's mostly for visual comfort so I suppose I can just turn word wrap on in my editor, but I'm just kinda curious. I'm writing some data files in JSON format and would like to have some really long…
Anonnobody
  • 7,911
  • 2
  • 15
  • 6
677
votes
10 answers

How do you write multiline strings in Go?

Does Go have anything similar to Python's multiline strings: """line 1 line 2 line 3""" If not, what is the preferred way of writing strings spanning multiple lines?
aeter
  • 9,522
  • 4
  • 22
  • 28
544
votes
43 answers

Java multiline string

Coming from Perl, I sure am missing the "here-document" means of creating a multi-line string in source code: $string = <<"EOF" # create a three-line string text text text EOF In Java, I have to have cumbersome quotes and plus signs on every line…
skiphoppy
  • 83,104
  • 64
  • 169
  • 214
533
votes
16 answers

Allow multi-line in EditText view in Android?

How to allow multi-line in Android's EditText view?
Adham
  • 58,520
  • 96
  • 215
  • 339
521
votes
13 answers

How to enter a multi-line command

Is it possible to split a PowerShell command line over multiple lines? In Visual Basic I can use the underscore (_) to continue the command in the next line.
eXXL
  • 5,428
  • 3
  • 17
  • 7
454
votes
25 answers

Multiple lines of text in UILabel

Is there a way to have multiple lines of text in UILabel like in the UITextView or should I use the second one instead?
Ilya Suzdalnitski
  • 49,863
  • 47
  • 128
  • 166
425
votes
24 answers

How do I match any character across multiple lines in a regular expression?

For example, this regex (.*) will match: abcde But how do I get it to match across multiple lines? abcde fghij
andyuk
  • 34,840
  • 15
  • 49
  • 52
381
votes
5 answers

Multiline for WPF TextBox

I am developing an app for sending some feedback. Basically I'm trying to make a TextBox for comments, but I'm used to the WinForms MultiLine=true. I've set MinLines to 3, which is getting there, but preferably I'd like it if the user is able to…
baron
  • 10,563
  • 20
  • 51
  • 86
287
votes
9 answers

Way to create multiline comments in Bash?

I have recently started studying shell script and I'd like to be able to comment out a set of lines in a shell script. I mean like it is in case of C/Java : /* comment1 comment2 comment3 */` How could I do that?
Enes Malik Turhan
  • 2,972
  • 2
  • 7
  • 9
266
votes
18 answers

Why doesn't Python have multiline comments?

OK, I'm aware that triple-quotes strings can serve as multiline comments. For example, """Hello, I am a multiline comment""" and '''Hello, I am a multiline comment''' But technically speaking these are strings, correct? I've googled and…
CoolGravatar
  • 5,178
  • 6
  • 32
  • 41
235
votes
7 answers

Android: Vertical alignment for multi line EditText (Text area)

I want to have 5 lines for the height of the text area. I am using the following code.
d-man
  • 53,999
  • 81
  • 200
  • 285
221
votes
6 answers

Paste a multi-line Java String in Eclipse

Unfortunately, Java has no syntax for multi-line string literals. No problem if the IDE makes it easy to work with constructs like String x = "CREATE TABLE TEST ( \n" + "A INTEGER NOT NULL PRIMARY KEY, \n" ... What is…
Thilo
  • 241,635
  • 91
  • 474
  • 626
200
votes
1 answer

C multi-line macro: do/while(0) vs scope block

Possible Duplicates: What’s the use of do while(0) when we define a macro? Why are there sometimes meaningless do/while and if/else statements in C/C++ macros? do { … } while (0) what is it good for? I've seen some multi-line C macros that are…
krasnaya
  • 2,684
  • 3
  • 19
  • 18
1
2 3
99 100