code: public static int lastIndexOfLetter(String string) {
      for (int i = 0; i < string.length(); i++) {
        char character = string.charAt(i);
        // Include "_".  See HHH-8073
        if (!Character.isLetter(character) && !('_' == character)) return i - 1;
      }
      return string.length() - 1;
    }
docs: /*public static boolean containsDigits(String string) {
  for ( int i=0; i<string.length(); i++ ) {
  if ( Character.isDigit( string.charAt(i) ) ) return true;
  }
  return false;
  }