Example usage for Java com.google.common.base Strings fields, constructors, methods, implement or subclass
The text is from its open source code.
String | commonPrefix(CharSequence a, CharSequence b) Returns the longest string prefix such that a.toString().startsWith(prefix) && b.toString().startsWith(prefix) , taking care not to split surrogate pairs. |
String | commonSuffix(CharSequence a, CharSequence b) Returns the longest string suffix such that a.toString().endsWith(suffix) && b.toString().endsWith(suffix) , taking care not to split surrogate pairs. |
String | emptyToNull(@Nullable String string) Returns the given string if it is nonempty; null otherwise. |
boolean | isNullOrEmpty(@Nullable String string) Returns true if the given string is null or is the empty string. |
String | nullToEmpty(@Nullable String string) Returns the given string if it is non-null; the empty string otherwise. |
String | padEnd(String string, int minLength, char padChar) Returns a string, of length at least minLength , consisting of string appended with as many copies of padChar as are necessary to reach that length. |
String | padStart(String string, int minLength, char padChar) Returns a string, of length at least minLength , consisting of string prepended with as many copies of padChar as are necessary to reach that length. |
String | repeat(String string, int count) Returns a string consisting of a specific number of concatenated copies of an input string. |