3 ms·
Yes. In the article: > This system was inspired by the Rust programming language. Rust stacks one or more pounds at each end of a string (and prefixes the lett
by chrismorgan 8y ago
Yes. In the article:
> This system was inspired by the Rust programming language. Rust stacks one or more pounds at each end of a string (and prefixes the letter “r”) to create what it calls “raw strings”, that is strings without further escape sequence interpretation. You cannot incorporate interpolation or coded tabs, new lines, or returns.
“one or more” should be “zero or more”, and the bit about the “r” prefix shouldn’t be parenthesised, as it’s actually the part that makes it a raw string. Also its mention of interpolation is poor: Rust doesn’t have interpolation on plain string literals, but things like the format!() macro perform what is more or less interpolation on their first argument (which must be a string literal), and raw strings work just fine there.
- richardwhiuk 8y agoThe key thing is that raw strings don't have escape sequences.