Some values span several lines. Today you parse a multiline basic string, delimited by three double quotes, which keeps embedded newlines and trims a single newline immediately after the opening delimiter.
Parse a triple-double-quoted multiline string with the leading-newline trim.
A multiline basic string is delimited by three double quotes """ and may span
many lines, which is handy for prose or embedded documents. Inside, the same escapes
as a basic string apply, but real newlines are allowed too and are kept as part of
the value. It reads up to the closing """, and everything between is content.
There is one trimming rule to get right: a newline immediately following the
opening delimiter is trimmed. This lets writers put the opening """ on its own
line for neatness without that first newline becoming part of the string. So opening
""" then a newline then first then a newline then second then a newline then
""" yields first\nsecond\n - the leading newline gone, the interior ones kept. A
\r\n right after the opener counts as that single trimmed newline. The whole
string may also sit on one line ("""abc""" is abc). The next lesson adds the
second, subtler trim: a backslash at the end of a line.
// a value opening with '"""' is a multiline basic string// read everything up to the closing '"""'// if the content begins with a newline, drop that one newline// (a "\r\n" right after the opener counts as the one newline)// process escapes exactly like a basic string; keep other newlines