Advertisement
NoiseDoll

Tokenizer

Aug 14th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1.         public int findTokenEnd(CharSequence text, int cursor) {
  2.             int i = cursor;
  3.             int len = text.length();
  4.             while (i < len) {
  5.                 if (text.charAt(i) == ',') {
  6.                     return i;
  7.                 } else {
  8.                     i++;
  9.                 }
  10.             }
  11.             return len;
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement