public class StringUtils extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T[] |
addAll(T[] array1,
T... array2)
copy from commons-lang3
Adds all the elements of the given arrays into a new array.
|
static <T> T[] |
clone(T[] array)
commons-lang3
Shallow clones an array returning a typecast result and handling
null. |
static boolean |
isEmpty(CharSequence cs) |
static boolean |
isNotEmpty(CharSequence cs) |
public static boolean isNotEmpty(CharSequence cs)
public static boolean isEmpty(CharSequence cs)
public static <T> T[] addAll(T[] array1,
T... array2)
Adds all the elements of the given arrays into a new array.
The new array contains all of the element of array1 followed
by all of the elements array2. When an array is returned, it is always
a new array.
ArrayUtils.addAll(null, null) = null ArrayUtils.addAll(array1, null) = cloned copy of array1 ArrayUtils.addAll(null, array2) = cloned copy of array2 ArrayUtils.addAll([], []) = [] ArrayUtils.addAll([null], [null]) = [null, null] ArrayUtils.addAll(["a", "b", "c"], ["1", "2", "3"]) = ["a", "b", "c", "1", "2", "3"]
T - the component type of the arrayarray1 - the first array whose elements are added to the new array, may be nullarray2 - the second array whose elements are added to the new array, may be nullnull if both arrays are null.
The type of the new array is the type of the first array,
unless the first array is null, in which case the type is the same as the second array.IllegalArgumentException - if the array types are incompatiblepublic static <T> T[] clone(T[] array)
Shallow clones an array returning a typecast result and handling
null.
The objects in the array are not cloned, thus there is no special handling for multi-dimensional arrays.
This method returns null for a null input array.
T - the component type of the arrayarray - the array to shallow clone, may be nullnull if null inputCopyright © 2020. All rights reserved.