@Override public Spliterator<String> trySplit() { int mid = (pos + fence) >>> 1; int nextPos = next(mid); if (nextPos == fence) return null; if (trimEmpty && nextPos == mid) { while (nextPos < fence && source.charAt(nextPos) == delimiter) nextPos++; return nextPos == fence ? new CharSpliterator(this, mid, true, 0, nextPos + 1) : new CharSpliterator(this, mid, false, nextPos - mid - 1, nextPos); } return new CharSpliterator(this, nextPos, false, 0, nextPos + 1); }
if (str.length() == 0) return of(""); return of(new CharSpliterator(str, delimiter, trimEmpty));