static String capitalizeFirstWordAsciiOnly(String s) {
    if (s == null || s.isEmpty()) {
      return s;
    }
    int secondWordStart = s.length();
    for (int i = 1; i < s.length(); i++) {
      if (!isLowerCaseAsciiOnly(s.charAt(i))) {
        secondWordStart = i;
        break;
      }
    }
    return toUpperCaseAsciiOnly(s.substring(0, secondWordStart)) + s.substring(secondWordStart);
  }
static String capitalizeFirstWordAsciiOnly ( String s ) { if ( s == null || s . isEmpty ( ) ) { return s ; } int secondWordStart = s . length ( ) ; for ( int i = 1 ; i < s . length ( ) ; i ++ ) { if ( ! isLowerCaseAsciiOnly ( s . charAt ( i ) ) ) { secondWordStart = i ; break ; } } return toUpperCaseAsciiOnly ( s . substring ( 0 , secondWordStart ) ) + s . substring ( secondWordStart ) ; }
"fooBar" -> "FOOBar"
"FooBar" -> "FOOBar"
"foo" -> "FOO"