Content deleted Content added
m →String literals: Forgot to move a section |
→String literals: Merge alternate quotes into their respective sections so their semantics are obvious |
||
Line 81:
|-
| <tt>"Hello, $name!"</tt>
|
|-▼
| Perl (alternate)
|-
| <tt>"Hello, {$name}!"</tt>
| PHP (alternate)
|-
| <tt>"Hello, #{name}!"</tt>
| CoffeeScript, Ruby
|-▼
| Ruby (alternate)
|-
| <tt>(format t "Hello, ~A" name)</tt>
Line 98 ⟶ 104:
| Swift
|}
=== Escaped quotes ===
"Escaped" quotes means that a 'flag' symbol is used to warn that the character after the flag is used in the string rather than ending the string.
Line 118 ⟶ 123:
| <tt>"I said ^"Hello, world!^""</tt>
| REBOL
|- ▼
| REBOL (alternate)
|-
| <tt>"I said, %"Hello, World!%""</tt>
Line 166 ⟶ 174:
| <tt>R"(Hello, world!)"</tt>
| C++11
▲|-
▲|-
▲| <tt>q(I said "Hello, world!")
▲qq(I said "Hello, $name!")</tt>
▲|-
▲| <tt>{I said "Hello, world!"}</tt>
|}
|