String capitalize(String value){
  char[] chars;
  int i;
  chars=value.toCharArray();
  if (chars.length > 0) {
    chars[0]=Character.toUpperCase(chars[0]);
    for (i=1; i < chars.length; ++i) {
      chars[i]=Character.toLowerCase(chars[i]);
    }
    return String.valueOf(chars);
  }
  return value;
}

String capitalize ( String value ) { char [ ] chars ; int i ; chars = value . toCharArray ( ) ; if ( chars . length > 0 ) { chars [ 0 ] = Character . toUpperCase ( chars [ 0 ] ) ; for ( i = 1 ; i < chars . length ; ++ i ) { chars [ i ] = Character . toLowerCase ( chars [ i ] ) ; } return String . valueOf ( chars ) ; } return value ; }
convenience method used to capitalize a one - off attribute value before it is returned . for example , the align values " left " and " left " will both return as " left " .
