3 ms·
And do you think that’s good or bad? I think it’s nice that there is only one escape character. You check for ‘\’. If it’s there, switch on the next character
by Someone 6y ago
And do you think that’s good or bad?
I think it’s nice that there is only one escape character. You check for ‘\’. If it’s there, switch on the next character checking for ‘n’, ‘t’, ‘r’ or ‘(‘, defaulting to appending the unmodified character to the output.
I think that might not only be simpler, but also be slightly faster than having having two different escapes would be.