You have to play compiler. When you see a \ you have to look at the next character and create the "escaped" character.
A switch should do it:
switch (theChar) {
case 'b': return '\b';
...
Type: Posts; User: Norm
You have to play compiler. When you see a \ you have to look at the next character and create the "escaped" character.
A switch should do it:
switch (theChar) {
case 'b': return '\b';
...
Not sure I follow. Can you give some examples in two columns.
Column one would be what is in the String at execution time (after the compiler has done all the escaping)
Coumn two would be the...
Is the same result is the single letter: b
What is it you are trying to do? If the String (at execution time) contains "\b" what do you want get from it?
What about if the String contains...