How to escape control characters?

Seb via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 30 20:23:52 PDT 2016


On Thursday, 31 March 2016 at 03:15:49 UTC, cy wrote:
> This might be a dumb question. How do I format a string so that 
> all the newlines print as \n and all the tabs as \t and such?

http://dlang.org/spec/lex.html#WysiwygString

r"ab\n" or `ab\n`


More information about the Digitalmars-d-learn mailing list