Created
April 20, 2015 13:26
-
-
Save leifoolsen/34c27ae3a33048772396 to your computer and use it in GitHub Desktop.
Check if a string contains only a given character using Guava CharMatcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CharMatcher.is('0').matchesAllOf("0000000") => true | |
CharMatcher.is('0').matchesAllOf("0000001") => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment