org.apache.hivemind.util
Class StringUtils

java.lang.Object
  extended by 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

Constructor Summary
StringUtils()
           
 
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 replace(java.lang.String string, java.lang.String pattern, java.lang.String replacement)
          Replaces all occurrences of pattern in string with replacement
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
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

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)

replace

public static java.lang.String replace(java.lang.String string,
                                       java.lang.String pattern,
                                       java.lang.String replacement)
Replaces all occurrences of pattern in string with replacement



Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.