I need to check a sequence of characters, such as \ chapter {Introduction}, from lines read from a file. To do this, I must first check for a backslash.
This is what I did
final char[] chars = strLine.toCharArray(); char c; for(int i = 0; i<chars.length; i++ ){ c = chars[i]; if(c == '\' ) { } }
But the backslash is treated as an escape sequence, not a character.
Any help on how that would be greatly appreciated.
source share