If either {@code trimResults} option is also specified when creating asplitter, that splitter always trims results first before checking for emptiness. So, for example, {@code Splitter.on(':').omitEmptyStrings().trimResults().split(": : : ")} returnsan empty iterable.
Note that it is ordinarily not possible for {@link #split(CharSequence)}to return an empty iterable, but when using this option, it can (if the input sequence consists of nothing but separators). @return a splitter with the desired configuration
|
|
|
|