public class StringHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
decapitalize(String string)
Returns the given string, with its first letter changed to lower-case unless the string starts with more than
one upper-case letter, in which case the string will be returned unaltered.
|
static boolean |
isNullOrEmptyString(String value)
Indicates if the string is null or is empty ie only contains whitespaces.
|
static String |
join(Iterable<?> iterable,
String separator)
Joins the elements of the given iterable to a string, separated by the given separator string.
|
static String |
join(Object[] array,
String separator)
Joins the elements of the given array to a string, separated by the given separator string.
|
static String |
toShortString(Member member)
Creates a compact string representation of the given member, useful for debugging or toString() methods.
|
static String |
toShortString(Type type)
Creates a compact string representation of the given type, useful for debugging or toString() methods.
|
public static String join(Object[] array, String separator)
array
- the array to joinseparator
- the separator stringpublic static String join(Iterable<?> iterable, String separator)
iterable
- the iterable to joinseparator
- the separator stringpublic static String decapitalize(String string)
Provided to avoid a dependency on the Introspector
API which is not available on the Android
platform (HV-779).
string
- the string to decapitalizenull
is returned if null
is passed as input; An empty
string is returned if an empty string is passed as inputIntrospector.decapitalize(String)
public static boolean isNullOrEmptyString(String value)
value
- the string consideredpublic static String toShortString(Member member)
public static String toShortString(Type type)
Copyright © 2019 JBoss by Red Hat. All rights reserved.