That is, prt("a \t\n") should print "a \t\n" literally,
is there any available function that does this?
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.
I am assuming you want to escape special characters; that is, you want to print
\ninstead of a newline character.Not in the standard library, as far as I know. You can easily write it yourself; the core of the function is something like this:
Generating the function body is also an option, as it can get quite tedious and repetitive.
This is how you can test it: