I need to find special escape java chars (\n, \t, \b, etc.) in a grooup of strings and then print what strings contain which special chars. So, when printing I would like to change the char value itself by a string “\n” for ‘\n’, “\t” for ‘\t’ and so on. I did with a switch statement for all this type of characters. I wonder if there is a solution that doesn’t involve checking for each one of the???
Share
I didn’t find a library for that, but on the other hand, my quick implementation doesn’t look too terrible – I’d prefer this even over a RegExp 😉
According to my compiler, theses are all escape sequences that are allowed for Strings.