Splitting strings, or building them from collections of objects, is a common task in any program. As usual, Guava has you covered with its two classes Splitter and Joiner. Splitter The Splitter class can split a String according to a character; a fixed string; a regular expression; a CharMatcher or even in pieces of the same fixed length. Creating a Splitter is quite simple: Splitter onSpace = Splitter.