boolean () { int i = index; while (i < myText.length() && Character.isWhitespace(myText.charAt(i))) { i++; } if (i == myText.length()) { return false; } myTokenStart = i; boolean isInQuote = false; do { char a = myText.charAt(i); if (!isInQuote && Character.isWhitespace(a)) { break; } if (a == '\\' && i + 1 < myText.length() && myText.charAt(i + 1) == '"') { i += 2; } else if (a == '"') { i++; isInQuote = !isInQuote; } else { i++; } } while (i < myText.length()); index = i; return true; }