public static String getDigitsOnly( String input ) {
    if ( Utils.isEmpty( input ) ) {
      return null;
    }
    StringBuilder digitsOnly = new StringBuilder();
    char c;
    for ( int i = 0; i < input.length(); i++ ) {
      c = input.charAt( i );
      if ( Character.isDigit( c ) ) {
        digitsOnly.append( c );
      }
    }
    return digitsOnly.toString();
  }
@Test
  public void testGetDigitsOnly() {
    assertNull( Const.removeDigits( null ) );
    assertEquals( "123456789", Const.getDigitsOnly( "123foo456bar789" ) );
  }