Finding Spaces, Newlines and Tabs with charAt()
This works for me:
char c = txt.charAt(strt);
if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
System.out.println("Found one at " + strt);
Yours works too, although it's a bit harder to follow. Why it doesn't work for you I don't know - maybe the string is badly formed? Are you sure you actually have tabs and stuff in it?