Uses of Class
com.google.common.base.Splitter
Packages that use Splitter
-
Uses of Splitter in com.google.common.base
Methods in com.google.common.base that return SplitterModifier and TypeMethodDescriptionstatic Splitter
Splitter.fixedLength
(int length) Returns a splitter that divides strings into pieces of the given length.Splitter.limit
(int maxItems) Returns a splitter that behaves equivalently tothis
splitter but stops splitting after it reaches the limit.Splitter.omitEmptyStrings()
Returns a splitter that behaves equivalently tothis
splitter, but automatically omits empty strings from the results.static Splitter
Splitter.on
(char separator) Returns a splitter that uses the given single-character separator.static Splitter
Splitter.on
(CharMatcher separatorMatcher) Returns a splitter that considers any single character matched by the givenCharMatcher
to be a separator.static Splitter
Returns a splitter that uses the given fixed string as a separator.static Splitter
Returns a splitter that considers any subsequence matchingpattern
to be a separator.static Splitter
Returns a splitter that considers any subsequence matching a given pattern (regular expression) to be a separator.Splitter.trimResults()
Returns a splitter that behaves equivalently tothis
splitter, but automatically removes leading and trailing whitespace from each returned substring; equivalent totrimResults(CharMatcher.whitespace())
.Splitter.trimResults
(CharMatcher trimmer) Returns a splitter that behaves equivalently tothis
splitter, but removes all leading or trailing characters matching the givenCharMatcher
from each returned substring.Methods in com.google.common.base with parameters of type SplitterModifier and TypeMethodDescriptionSplitter.withKeyValueSeparator
(Splitter keyValueSplitter) Returns aMapSplitter
which splits entries based on this splitter, and splits entries into keys and values using the specified key-value splitter.