public final class StringUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isNotNullOrEmpty(String data)
Determines if the given
String is not null or empty. |
static boolean |
isNullOrEmpty(String data)
Determines if the given
String is null or empty. |
static String |
replaceLast(String source,
char toReplace,
char toUse)
Replaces the last occurrence of a character in the given source.
|
static String |
replaceLast(String source,
String toReplace,
String toUse)
Replaces the last occurrence of a character in the given source.
|
static String |
stripStringIndicators(String data)
* Strips the " characters at the start and end of the given string if present.
|
public static String replaceLast(String source, char toReplace, char toUse)
source - source which contains the data to be usedtoReplace - the character that is to be replacedtoUse - the character that is used insteadString where last occurrence of the given character is replaced by the provided character or the original string if its null or does not contain the characterpublic static String replaceLast(String source, String toReplace, String toUse)
source - source which contains the data to be usedtoReplace - the character that is to be replacedtoUse - the character that is used insteadString where last occurrence of the given character is replaced by the provided character or the original string if its null or does not contain the characterpublic static boolean isNullOrEmpty(String data)
String is null or empty.public static boolean isNotNullOrEmpty(String data)
String is not null or empty.public static String stripStringIndicators(String data)
data - data to be used, must not be null or emptyIllegalArgumentException - if the given data is null or emptyCopyright © 2016 Saxonia Systems AG. All rights reserved.