protected static String c2h(String camel){
  StringBuilder b=new StringBuilder(camel.length() + 5);
  for (int i=0; i < camel.length(); ++i) {
    char c=camel.charAt(i);
    if (Character.isUpperCase(c)) {
      if (i != 0)       b.append('-');
      b.append(Character.toLowerCase(c));
    }
 else {
      b.append(camel.charAt(i));
    }
  }
  return b.toString();
}

protected static String c2h ( String camel ) { StringBuilder b = new StringBuilder ( camel . length ( ) + 5 ) ; for ( int i = 0 ; i < camel . length ( ) ; ++ i ) { char c = camel . charAt ( i ) ; if ( Character . isUpperCase ( c ) ) { if ( i != 0 ) b . append ( '-' ) ; b . append ( Character . toLowerCase ( c ) ) ; } else { b . append ( camel . charAt ( i ) ) ; } } return b . toString ( ) ; }
convert studlycaps or camelcase to hyphenated
