To clarify on @Joel Berkeley's answer:
When using the raw
interpolator, as in raw"\n"
, you get a String which has two charaters in it, verbatim, a \ and a n.
Now, when you have a normal String, e.g. "\n"
, you get a String with a single character, namely a "line feed" LF, ASCII code 10.
Then, if you embed that into a new string, using whatever interpolator you want (ie. it does not matter whether you use s
, f
, or raw
), you still get the same character no matter what since the value of the string is inserted in the resulting string.
Just to reiterate, there is no "raw format", you always just get a String, it's just a different interpretation of the character of the string itself when it is constructed.