multiline string literal with CRLF
Marek Janukowicz via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 26 11:57:04 PDT 2015
anonymous wrote:
>> Is there any way to input such a literal? Both `...` and q"EOS...EOS" do
>> not allow escape sequences. I'm on Linux, but I need precisely CRLF, not
>> just \n.
>
> I'm probably missing the point, but:
>
> "Hello\r\nworld"
>
> Or if you want to include the \n verbatim:
>
> "Hello\r
> world"
Thanks, this works - I don't know how I did it the first time, because I
definitely tried that and failed.
The other solution by Adam also works - thanks.
--
Marek Janukowicz
More information about the Digitalmars-d-learn
mailing list