public static final String capitalize(String str,char... delimiters){
  final int delimLen=delimiters == null ? -1 : delimiters.length;
  if (TextUtils.isEmpty(str) || delimLen == 0) {
    return str;
  }
  final char[] buffer=str.toCharArray();
  boolean capitalizeNext=true;
  for (int i=0; i < buffer.length; i++) {
    char ch=buffer[i];
    if (isDelimiter(ch,delimiters)) {
      capitalizeNext=true;
    }
 else     if (capitalizeNext) {
      buffer[i]=Character.toTitleCase(ch);
      capitalizeNext=false;
    }
  }
  return new String(buffer);
}

public static final String capitalize ( String str , char ... delimiters ) { final int delimLen = delimiters == null ? - 1 : delimiters . length ; if ( TextUtils . isEmpty ( str ) || delimLen == 0 ) { return str ; } final char [ ] buffer = str . toCharArray ( ) ; boolean capitalizeNext = true ; for ( int i = 0 ; i < buffer . length ; i ++ ) { char ch = buffer [ i ] ; if ( isDelimiter ( ch , delimiters ) ) { capitalizeNext = true ; } else if ( capitalizeNext ) { buffer [ i ] = Character . toTitleCase ( ch ) ; capitalizeNext = false ; } } return new String ( buffer ) ; }
capitalizes the first character in a string
