Haskell - Do literal backslashes always have to be escaped in a string? -
Haskell - Do literal backslashes always have to be escaped in a string? -
in haskell, in order represent literal string "\"
, 1 write:
"\\"
however, there way escape string such single backslash can written without needing escaped? example, can in c# pre-pending @
string:
@"\"
does haskell have equivalent?
no, see section 2.6 of haskell lexical structure.
haskell doesn't have raw strings, heredocs or triple strings. sorry. fanciness this:
"ab\ \cd" => "abcd"
white space between line-ending , -beginning slashes ignored. useful, example, if want emit inline html indented in haskell source, not overly indented in output. (not i'd advocate doing complicated html output way.)
string haskell
Comments
Post a Comment