I am trying to check if there is a space, new line or tab at the current location of the character. Spaces work, but tabs and newlines are not used. Go figure, I use escapes for those, and just regular space for spaces ... What is the right way to find them in a specific place?
if(String.valueOf(txt.charAt(strt)).equals(" ") || txt.charAt(strt) == '\r' || txt.charAt(strt) == '\n' || txt.charAt(strt) == '\t') { //do stuff }
source share