/** * Converts the first character in this {@code CharSeq} to upper * case using the rules of the default locale. If the {@code CharSeq} is * empty, it won't have any effect. This method is equivalent to * {@code capitalize(Locale.getDefault())}. * <p> * <b>Note:</b> This method is locale sensitive, and may produce unexpected * results if used for strings that are intended to be interpreted locale * independently. * Examples are programming language identifiers, protocol keys, and HTML * tags. * For instance, {@code "title".toUpperCase()} in a Turkish locale * returns {@code "T\u005Cu0130TLE"}, where '\u005Cu0130' is the * LATIN CAPITAL LETTER I WITH DOT ABOVE character. * To obtain correct results for locale insensitive strings, use * {@code toUpperCase(Locale.ROOT)}. * <p> * * @return the {@code CharSeq}, capitalized. */ public CharSeq capitalize() { return capitalize(Locale.getDefault()); }
/** * Converts the first character in this {@code CharSeq} to upper * case using the rules of the default locale. If the {@code CharSeq} is * empty, it won't have any effect. This method is equivalent to * {@code capitalize(Locale.getDefault())}. * <p> * <b>Note:</b> This method is locale sensitive, and may produce unexpected * results if used for strings that are intended to be interpreted locale * independently. * Examples are programming language identifiers, protocol keys, and HTML * tags. * For instance, {@code "title".toUpperCase()} in a Turkish locale * returns {@code "T\u005Cu0130TLE"}, where '\u005Cu0130' is the * LATIN CAPITAL LETTER I WITH DOT ABOVE character. * To obtain correct results for locale insensitive strings, use * {@code toUpperCase(Locale.ROOT)}. * <p> * * @return the {@code CharSeq}, capitalized. */ public CharSeq capitalize() { return capitalize(Locale.getDefault()); }