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

Method omitEmptyStrings

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

Returns a splitter that behaves equivalently to {@code this} splitter, but automatically omits empty strings from the results. For example, {@code Splitter.on(',').omitEmptyStrings().split(",a,,,b,c,,")} returns an iterable containing only {@code ["a", "b", "c"]}. <p>If either {@code trimResults} o

()

Source from the content-addressed store, hash-verified

302 * @return a splitter with the desired configuration
303 */
304 public Splitter omitEmptyStrings() {
305 return new Splitter(strategy, true, trimmer, limit);
306 }
307
308 /**
309 * Returns a splitter that behaves equivalently to {@code this} splitter but stops splitting after

Calls

no outgoing calls