Literals/String: Difference between revisions
Content added Content deleted
(Add Factor example) |
No edit summary |
||
Line 1,150: | Line 1,150: | ||
jq allows the shorthand: "The value of s is \(s)", and in general, arbitrarily many such interpolations may be made. |
jq allows the shorthand: "The value of s is \(s)", and in general, arbitrarily many such interpolations may be made. |
||
=={{header|Julia}}== |
|||
Concatenation: |
|||
<lang julia>greet = "Hello" |
|||
whom = "world" |
|||
greet * ", " * whom * "."</lang> |
|||
Interpolation: |
|||
<lang julia>"$greet, $whom."</lang> |
|||
Both will output: |
|||
<lang julia>Hello, world.</lang> |
|||
Triple-quoted strings |
|||
<lang julia>str = """Hello, |
|||
world. |
|||
""" |
|||
print(str)</lang> |
|||
Will output: |
|||
<lang julia>Hello, |
|||
world.</lang> |
|||
=={{header|Kotlin}}== |
=={{header|Kotlin}}== |