private static String transThree ( String s ) { String value = "" ; if ( s . startsWith ( "0" ) ) { // 是否小於100 value = transTwo ( s . substring ( 1 ) ) ; } else if ( s . substring ( 1 ) . equals ( "00" ) ) { // 是否被100整除 value = parseFirst ( s . substring ( 0 , 1 ) ) + " HUNDRED" ; } else { value = parseFirst ( s . substring ( 0 , 1 ) ) + " HUNDRED AND " + transTwo ( s . substring ( 1 ) ) ; } return value ; }
s . length = 3