In the swift official documentation: "the swift programming language"-"LANGUAGE REFERENCE"-"Lexical Structure"-"String Literals"-"GRAMMAR OF A STRING LITERAL".
It says:
escape-sequence → \ extended-string-literal-delimiter
and
"extended-string-literal-delimiter →
I think:
escape-sequence SHOULD → \ NOT → \ extended-string-literal-delimiter
Am I right? Thanks in advance.
It says:
escape-sequence → \ extended-string-literal-delimiter
and
"extended-string-literal-delimiter →
extended-string-literal-delimiter opt"
I think:
escape-sequence SHOULD → \ NOT → \ extended-string-literal-delimiter
Am I right? Thanks in advance.
As far as I checked, there are many incorrect parts in the Lexical Structure section, and I think escape-sequence should be:
escape-sequence → \ extended-string-literal-delimiter opt
When you write a String literal like ###"..."###, \### is a valid escape sequence.
is equivalent to:
You should better check this article:
Behind the Proposal — SE-0200 Enhancing String Literals Delimiters to Support Raw Text
escape-sequence → \ extended-string-literal-delimiter opt
When you write a String literal like ###"..."###, \### is a valid escape sequence.
Code Block let str = ###"abc\r\n\###r\###n"###
is equivalent to:
Code Block let str = "abc\\r\\n\r\n"
You should better check this article:
Behind the Proposal — SE-0200 Enhancing String Literals Delimiters to Support Raw Text