In Python, I can prefix an r to a string literal (raw string) to tell the interpreter not translate special characters in the string:
>>> r"abc\nsdf#$%\^"
r"abc\nsdf#$%\^"
Is there a way to do the same thing in Clojure?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Clojure strings are Java strings and the reader does not add anything significant to their interpretation. The reader page just says “standard Java escape characters are supported.”
You can escape the
\though:This only affect string literals read by the reader, so if you read strings from a file the reader never sees them:
So, I think the basic answer is no.