private void init(CharSequence chars) { final FastStr fs = FastStr.of(chars); final int sz = fs.length(); int last = nextNonSeparator(fs, 0); int pos; while (true) { pos = locateNextStop(fs, last); if (pos < 0 || pos == sz) { FastStr sub = fs.substr(last); if (!sub.isEmpty()) { list.add(sub.toLowerCase()); } break; } FastStr sub = fs.subSequence(last, pos); if (!sub.isEmpty()) { list.add(sub.toLowerCase()); } last = nextNonSeparator(fs, pos); } }
private void init(CharSequence chars) { final FastStr fs = FastStr.of(chars); final int sz = fs.length(); int last = nextNonSeparator(fs, 0); int pos; while (true) { pos = locateNextStop(fs, last); if (pos < 0 || pos == sz) { FastStr sub = fs.substr(last); if (!sub.isEmpty()) { list.add(sub.toLowerCase()); } break; } FastStr sub = fs.subSequence(last, pos); if (!sub.isEmpty()) { list.add(sub.toLowerCase()); } last = nextNonSeparator(fs, pos); } }