org.apache.hivemind.util
Class StringUtils
java.lang.Object
org.apache.hivemind.util.StringUtils
- public class StringUtils
- extends java.lang.Object
A subset of the utilities available in commons-lang StringUtils. It's all
about reducing dependencies, baby!
- Author:
- Howard Lewis Ship
Method Summary |
static java.lang.String |
capitalize(java.lang.String input)
Converts a string such that the first character is upper case. |
static java.lang.String |
join(java.lang.String[] input,
char separator)
|
static java.lang.String[] |
split(java.lang.String input)
Splits an input string into a an array of strings, seperating
at commas. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringUtils
public StringUtils()
split
public static java.lang.String[] split(java.lang.String input)
- Splits an input string into a an array of strings, seperating
at commas.
- Parameters:
input
- the string to split, possibly null or empty
- Returns:
- an array of the strings split at commas
capitalize
public static java.lang.String capitalize(java.lang.String input)
- Converts a string such that the first character is upper case.
- Parameters:
input
- the input string (possibly empty)
- Returns:
- the string with the first character converted from lowercase to upper case (may
return the string unchanged if already capitalized)
join
public static java.lang.String join(java.lang.String[] input,
char separator)