Skip to content

Commit

Permalink
Added string literal docs (#40835)
Browse files Browse the repository at this point in the history
Co-authored-by: Simeon Schaub <[email protected]>
  • Loading branch information
Qfl3x and simeonschaub committed May 20, 2021
1 parent 605a14a commit 27066a7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2698,4 +2698,46 @@ A quoted piece of code, that does not support interpolation. See the [manual sec
"""
QuoteNode


"""
"
`"` Is used to delimit string literals.
# Examples
```jldoctest
julia> "Hello World!"
"Hello World!"
julia> "Hello World!\\n"
"Hello World!\\n"
```
See also [`\"""`](@ref \"\"\").
"""
kw"\""

"""
\"""
`\"""` is used to delimit string literals. Strings created by triple quotation marks can contain `"` characters without escaping and are dedented to the level of the least-indented line. This is useful for defining strings within code that is indented.
# Examples
```jldoctest
julia> \"""Hello World!\"""
"Hello World!"
julia> \"""Contains "quote" characters\"""
"Contains \\"quote\\" characters"
julia> \"""
Hello,
world.\"""
"Hello,\\nworld."
```
See also [`"`](@ref \")
"""
kw"\"\"\""

end

0 comments on commit 27066a7

Please sign in to comment.