[swift-evolution] multi-line string literals.
tseitz42 at icloud.com
Wed Apr 5 07:23:40 CDT 2017
> Am 03.04.2017 um 17:09 schrieb Ricardo Parada via swift-evolution <swift-evolution at swift.org>:
> Hi Adrian,
> I'm not sure if I am understanding what you are saying.
> To me a multi-line string literal is not about continuing a "very long string" into the next line.
> To me a multi-line string literal is about having a string literal that represents multiple lines of text, where each line is separated by a new line character. It's just like when you look at a text file in the editor and you don't see the \n at the end of each line. You just see multiple lines of text. Same philosophy applies here, but with some useful features such as being able to use escape \, interpolation and quotes mainly.
Same for me. I'd like to be able to copy a multiline string as it is without having any control characters in there, e.g. imagine an SQL query which can just be copied over into a databse tool and executed there without having to remove leading and trailing characters.
I have nothing against *optional* leading and/or trailing control characters for improved precision when required.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution