Skip to content

Commit 27066a7

Browse files
Qfl3xsimeonschaub
andauthored
Added string literal docs (#40835)
Co-authored-by: Simeon Schaub <[email protected]>
1 parent 605a14a commit 27066a7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

base/docs/basedocs.jl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2698,4 +2698,46 @@ A quoted piece of code, that does not support interpolation. See the [manual sec
26982698
"""
26992699
QuoteNode
27002700

2701+
2702+
"""
2703+
"
2704+
`"` Is used to delimit string literals.
2705+
2706+
# Examples
2707+
2708+
```jldoctest
2709+
julia> "Hello World!"
2710+
"Hello World!"
2711+
2712+
julia> "Hello World!\\n"
2713+
"Hello World!\\n"
2714+
```
2715+
2716+
See also [`\"""`](@ref \"\"\").
2717+
"""
2718+
kw"\""
2719+
2720+
"""
2721+
\"""
2722+
`\"""` 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.
2723+
2724+
# Examples
2725+
2726+
```jldoctest
2727+
julia> \"""Hello World!\"""
2728+
"Hello World!"
2729+
2730+
julia> \"""Contains "quote" characters\"""
2731+
"Contains \\"quote\\" characters"
2732+
2733+
julia> \"""
2734+
Hello,
2735+
world.\"""
2736+
"Hello,\\nworld."
2737+
```
2738+
2739+
See also [`"`](@ref \")
2740+
"""
2741+
kw"\"\"\""
2742+
27012743
end

0 commit comments

Comments
 (0)