public class Strings
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static boolean |
hasText(java.lang.String s) |
static java.lang.String |
indent(int times,
java.lang.String text) |
static boolean |
isEmpty(java.lang.String s) |
static java.lang.String |
join(java.lang.String delimiter,
java.util.Collection<?> elements)
Same as
join(String, Object...) but with a Collection instead of an Array for the
elements. |
static java.lang.String |
join(java.lang.String delimiter,
java.lang.Object... elements)
Joins all non-null elements of the given
elements into one String. |
static java.lang.String |
toSingleLineString(java.lang.Object object) |
public static boolean hasText(java.lang.String s)
public static boolean isEmpty(java.lang.String s)
public static java.lang.String join(java.lang.String delimiter, java.lang.Object... elements)
elements
into one String.delimiter
- Inserted as separator between consecutive elements.elements
- The elements to join.public static java.lang.String join(java.lang.String delimiter, java.util.Collection<?> elements)
join(String, Object...)
but with a Collection
instead of an Array for the
elements.public static java.lang.String toSingleLineString(java.lang.Object object)
public static java.lang.String indent(int times, java.lang.String text)