Just the opposite of trimming a string on the right, this example will trim whitespace from the beginning of the string using guava, apache commons and spring framework utilities.
Google Guava
This snippet will trim leading whitespace from a string using guava's CharMatcher. CharMatcher.WHITESPACE will determine whether a character is whitespace then calling trimLeadingFrom will omit all characters that match.
Apache Commons
This snippet will remove blanks from the beginning of a string using apache commons. StringUtils.stripStart will strip any whitespace from the start of the specified string.
Spring Framework
This snippet will left trim leading whitespace from a string using springframework's StringUtils utility.