Java com.google.common.base Strings fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.base Strings fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.base Strings.

The text is from its open source code.

Method

StringcommonPrefix(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.
StringcommonSuffix(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.
StringemptyToNull(@Nullable String string)
Returns the given string if it is nonempty; null otherwise.
booleanisNullOrEmpty(@Nullable String string)
Returns true if the given string is null or is the empty string.
StringnullToEmpty(@Nullable String string)
Returns the given string if it is non-null; the empty string otherwise.
StringpadEnd(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.
StringpadStart(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.
Stringrepeat(String string, int count)
Returns a string consisting of a specific number of concatenated copies of an input string.