s : String := "Will this compile? " &
"Oh yes it will";
"AzIceaqfA1hX5wS+M8cGnYh5ceevUnOZIzJBbXFD6dgf3tBkb9cvUF/Tkd/iKu2fsg9wAysY"
"Kw7RMAsVvIp4KcXle/v1RaXrLVnNBJ2H2DmrbUMOZbQUFXe698qmJsqNpLXRA367xpZ54i8k"
"C5DTXwDhfxWTOZrBrh5sRKHcoVLumztIQjgWh37AzmSd1bLOfUGI0xjAL9zJWO3fRaeB0NS2"
"KlmoKaVT5Y04zZEc06waU2r6AU2Dc4uipJqJmObqKM+tfNKAS0rZr5IudRiC7pUwnmtaHRe5"
"fgSI8M7yvypvm+13Wm4Gwd4VnYiZvSxf8ImN3ZOG9wEzfyMIlH2+rKPUVHI+igsqla0Wd9m7"
"ZUR9vFotj1uYV0OzG7hX0+huN2E/IdgLDjbiapj1e2fKHrMmGFaIvI6xzzJIQJF9GiRZ7+0j"
"NFLKSyzX/K3JAyFrIPObfwM+y
(def s "Murs, ville,
Et port,
Asile
De mort,
Mer grise
Où brise
La brise,
Tout dort.")
IDENTIFICATION DIVISION.
PROGRAM-ID. multi-line string.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 s PIC X(20).
01 str PIC X(5) VALUE 'COBOL'.
01 str1 PIC X(4) VALUE 'RULE'.
01 str2 PIC X(3) VALUE 'THE'.
01 str3 PIC X(5) VALUE 'WORLD'.
PROCEDURE DIVISION.
STRING str ' ' str1 ' ' str2 ' ' str3
DELIMITED BY SIZE INTO s
STOP RUN.
std::string s = R"( Earth is a planet.
So is the Jupiter)";
string s = @"Huey
Dewey
Louie";
auto s = "One,
Two,
Three
";
auto s = r"line1
line2
line3";
auto s = `line1
line2
line3`;
var s = '''A
multi-line
string''';
var s = """A
multi-line
string""";
s = "Spanning
string
works"
s = ~S"""
This will print multiline
and escape char like \G
"""
s = """
multiline
heredoc
"""
S = "Strings
may span
across multiple lines"
"and they can"
"have as many portions"
"as you want"
"all of them quoted".
def s = """\
line 1
line 2
line 3""".stripIndent()
def s = """line 1
line 2
line 3"""
s :: String
s = "We will put a backslash to take a break\
\and then a backslash to resume"
s = unlines [
"several"
,"lines"
,"of"
,"text"]
let s = "This is a very long string which needs \n" +
"to wrap across multiple lines because \n" +
"otherwise my code is unreadable.";
let s = `This is a very long string which needs
to wrap across multiple lines because
otherwise my code is unreadable.`;
let s = "This is a very long string which needs \
to wrap across multiple lines because \
otherwise my code is unreadable.";
String s = "This is a very long string which needs \n" +
"to wrap across multiple lines because \n" +
"otherwise my code is unreadable.";
String s = """
This is a very long string which needs
to wrap across multiple lines because
otherwise my code is unreadable.
""";
String lineSeparator = System.lineSeparator();
String s = "line1" + lineSeparator + "line2" + lineSeparator;
val s =
"""
This is my
multi-line string.
"""
s = 'Huey \n'..
'Dewey \n'..
'Louie'
s = [[
Huey
Dewey
Louie
]]
NSString *s=@"Huey\n"
@"Dewey\n"
@"Louie";
$s = "This string
is spanning
three lines";
$s = <<<EOD
Huey
Dewey
Louie
EOD;
var
_s: String;
begin
_s := 'one' + LineEnding + 'two' + LineEnding + 'three'
end.
$s = q{
There are a good few ways to create multiline
text strings in perl.
};
$s =<<EOSTR;
One of the ways to create multiline text is called
the "here doc" (lifted from various UNIX shells).
A 'here doc' is the <<tag construct. Perl continues to treat
all the text found as part of the string until there's a line containing
the EOSTR tag at the beginning
EOSTR
$s = "Perl normally allows
strings to contain newlines.";
s = """Huey
Dewey
Louie"""
s = "Spanning
string
works"
s = <<EOS
This is a
multi-line string.
We call it a "heredoc"
EOS
let s = "line 1
line 2
line 3";
let s = r#"Huey
Dewey
Louie"#;
val s = """line 1
line 2
line 3"""
val s = """line 1
|line 2
|line 3""".stripMargin
(define s "This is my multi-line literal.
Line number two!
This line starts with two spaces.")
s := 'Will this compile?
Oh yes, it will!'.
Dim s as String = "
This
Is
Multiline
Text!"