|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.opensagres.xdocreport.utils.StringUtils
public class StringUtils
String Utilities.
| Field Summary | |
|---|---|
static String[] |
EMPTY_STRING_ARRAY
|
| Constructor Summary | |
|---|---|
StringUtils()
|
|
| Method Summary | |
|---|---|
static boolean |
isEmpty(String str)
Checks if a String is empty ("") or null. |
static boolean |
isNotEmpty(String str)
Checks if a String is not empty ("") and not null. |
static String |
replaceAll(String line,
String oldString,
String newString)
Replace the oldString by the newString in the line and returns the result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String[] EMPTY_STRING_ARRAY
| Constructor Detail |
|---|
public StringUtils()
| Method Detail |
|---|
public static final String replaceAll(String line,
String oldString,
String newString)
line - the line to replace.oldString - old token to replace.newString - new token to replace.
public static boolean isEmpty(String str)
Checks if a String is empty ("") or null.
StringUtils.isEmpty(null) = true StringUtils.isEmpty("") = true
StringUtils.isEmpty(" ") = false StringUtils.isEmpty("bob") = false
StringUtils.isEmpty(" bob ") = false
str - the String to check, may be null
true if the String is empty or nullpublic static boolean isNotEmpty(String str)
Checks if a String is not empty ("") and not null.
StringUtils.isNotEmpty(null) = false
StringUtils.isNotEmpty("") = false
StringUtils.isNotEmpty(" ") = true
StringUtils.isNotEmpty("bob") = true
StringUtils.isNotEmpty(" bob ") = true
str - the String to check, may be null
true if the String is not empty and not null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||