Skip to content

Commit

Permalink
Added string literal docs (JuliaLang#40835)
Browse files Browse the repository at this point in the history
Co-authored-by: Simeon Schaub <[email protected]>
  • Loading branch information
2 people authored and Amit Shirodkar committed Jun 9, 2021
1 parent bd98059 commit 07ffc31
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 07ffc31

Please sign in to comment.