Skip to content

Commit

Permalink
document newline normalization in literal strings (#14073)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9ac2fd5)
ref #14078
  • Loading branch information
stevengj authored and tkelman committed Nov 29, 2015
1 parent 92ad061 commit 90584a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions doc/manual/strings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ backslash:
julia> print("I have \$100 in my account.\n")
I have $100 in my account.

Triple-Quoted Strings Literals
------------------------------
Triple-Quoted String Literals
-----------------------------

When strings are created using triple-quotes (``"""..."""``) they have some
special behavior that can be useful for creating longer blocks of text. First,
Expand Down Expand Up @@ -484,6 +484,12 @@ defining strings within code that is indented. For example:
In this case the final (empty) line before the closing ``"""`` sets the
indentation level.

Note that line breaks in literal strings, whether single- or triple-quoted,
result in a newline (LF) character ``\n`` in the string, even if your
editor uses a carriage return ``\r`` (CR) or CRLF combination to end lines.
To include a CR in a string, use an explicit escape ``\r``; for example,
you can enter the literal string ``"a CRLF line ending\r\n"``.

Common Operations
-----------------

Expand Down

0 comments on commit 90584a9

Please sign in to comment.