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.

1916 questions
3397
votes
43 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
  • 38,977
  • 9
  • 43
  • 59
1935
votes
30 answers

How do I split the definition of a long string over multiple lines?

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
  • 26,057
  • 6
  • 30
  • 33
1107
votes
15 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
  • 11,239
  • 2
  • 18
  • 6
884
votes
12 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
  • 11,960
  • 6
  • 27
  • 29
850
votes
10 answers

Multi-Line Comments in Ruby?

How can I comment multiple lines in Ruby?
Mohit Jain
  • 43,139
  • 57
  • 169
  • 274
633
votes
15 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
  • 6,548
  • 3
  • 19
  • 7
621
votes
43 answers

Does Java have support for multiline strings?

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
  • 97,646
  • 72
  • 174
  • 218
584
votes
26 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
  • 38,118
  • 16
  • 52
  • 52
581
votes
15 answers

Allow multi-line in EditText view in Android?

How to allow multi-line in Android's EditText view?
Adham
  • 63,550
  • 98
  • 229
  • 344
480
votes
26 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
  • 52,598
  • 51
  • 134
  • 168
424
votes
12 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
  • 4,342
  • 3
  • 9
  • 9
408
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
  • 11,011
  • 20
  • 54
  • 88
282
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,408
  • 7
  • 35
  • 42
236
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
  • 57,473
  • 85
  • 212
  • 296
232
votes
6 answers

How to execute multi-line statements within Python's own debugger (PDB)

So I am running a Python script within which I am calling Python's debugger, PDB by writing: import ipdb; ipdb.set_trace() (iPython's version of PDB, though for the matter I don't think it makes a difference; I use it for the colored output…
Mike
  • 2,321
  • 3
  • 14
  • 3
1
2 3
99 100