|
OCPsoft Common API 1.0.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ocpsoft.common.util.Strings
public final class Strings
Utility methods for manipulating String instances
| Constructor Summary | |
|---|---|
Strings()
|
|
| Method Summary | |
|---|---|
static boolean |
areEqual(String left,
String right)
Return true if the given String instances are equal, or if both String instances are null. |
static boolean |
areEqualTrimmed(String left,
String right)
Return true if the given String instances are equal when outer whitespace is removed, or if both
String instances are null. |
static String |
capitalize(String input)
Capitalize the given String: "input" -> "Input" |
static boolean |
isNullOrEmpty(String string)
Return true if the given String is null or is empty. |
static boolean |
isTrue(String value)
Return true if the given String equals "true", case insensitive; otherwise return false. |
static String |
join(Collection<?> collection,
String delimiter)
Join a Collection of String instances using the given delimiter. |
static String |
uncapitalize(String input)
Uncapitalize the given String. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Strings()
| Method Detail |
|---|
public static boolean areEqual(String left,
String right)
String instances are equal, or if both String instances are null.
public static boolean areEqualTrimmed(String left,
String right)
String instances are equal when outer whitespace is removed, or if both
String instances are null. (E.g.: " hello world " is equal to "hello world ")
public static String capitalize(String input)
String: "input" -> "Input"
public static boolean isNullOrEmpty(String string)
String is null or is empty.
public static boolean isTrue(String value)
String equals "true", case insensitive; otherwise return false.
public static String join(Collection<?> collection,
String delimiter)
Collection of String instances using the given delimiter.
public static String uncapitalize(String input)
String. (E.g.: "CamelCase" -> "camelCase")
|
OCPsoft Common API 1.0.5.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||