public String normalizeNumber ( final String number ) { try { final BigDecimal normalizedNumber = parseNumber ( new NumberBuffer ( number ) ) ; if ( normalizedNumber == null ) { return number ; } return normalizedNumber . toBigIntegerExact ( ) . toString ( ) ; } catch ( NumberFormatException | ArithmeticException e ) { // Return the source number in case of error, i.e. malformed input return number ; } }
Normalizes a Japanese number