MCPcopy
hub / github.com/google/guava / splitToStream

Method splitToStream

guava/src/com/google/common/base/Splitter.java:419–422  ·  view source on GitHub ↗

Splits {@code sequence} into string components and makes them available through an {@link Stream}, which may be lazily evaluated. If you want an eagerly computed {@link List}, use {@link #splitToList(CharSequence)}. @param sequence the sequence of characters to split @return a stream over the segme

(CharSequence sequence)

Source from the content-addressed store, hash-verified

417 * @since 28.2 (but only since 33.4.0 in the Android flavor)
418 */
419 public Stream<String> splitToStream(CharSequence sequence) {
420 // Can't use Streams.stream() from base
421 return StreamSupport.stream(split(sequence).spliterator(), false);
422 }
423
424 /**
425 * Returns a {@code MapSplitter} which splits entries based on this splitter, and splits entries

Callers 1

Calls 3

splitMethod · 0.95
spliteratorMethod · 0.65
streamMethod · 0.45

Tested by 1