Java Utililty Methods String Capitalize Full

List of utility methods to do String Capitalize Full

Description

The list of methods to do String Capitalize Full are organized into topic(s).

Method

StringcapitalizeFully(String input)
capitalize Fully
if (input == null)
    return null;
String s = input.toLowerCase();
int strLen = s.length();
StringBuffer buffer = new StringBuffer(strLen);
boolean capitalizeNext = true;
for (int i = 0; i < strLen; i++) {
    char ch = s.charAt(i);
...
StringcapitalizeFully(String input, String delimiters)
This is a re-implementation of the capitalizeFully of Apache commons lang, because it appears not working properly.
if (input == null) {
    return null;
String output = "";
boolean toUpper = true;
for (int c = 0; c < input.length(); c++) {
    char ch = input.charAt(c);
    if (delimiters.indexOf(ch) != -1) {
...
StringcapitalizeFully(String str)

Capitalizes all the whitespace separated words in a String.

int strLen;
if (str == null || (strLen = str.length()) == 0) {
    return str;
StringBuffer buffer = new StringBuffer(strLen);
boolean whitespace = true;
for (int i = 0; i < strLen; i++) {
    char ch = str.charAt(i);
...
StringcapitalizeFully(String str)

Capitalizes all the whitespace separated words in a String.

return capitalizeFully(str, null);
StringcapitalizeFully(String str)

Converts all the whitespace separated words in a String into capitalized words, that is each word is made up of a titlecase character and then a series of lowercase characters.

return capitalizeFully(str, null);
StringcapitalizeFully(String str)
capitalize Fully
return capitalizeFully(str, null);
StringcapitalizeFully(String str, final char... delimiters)
capitalize Fully
final int delimLen = delimiters == null ? -1 : delimiters.length;
if (isEmpty(str) || delimLen == 0) {
    return str;
str = str.toLowerCase();
return capitalize(str, delimiters);
StringcapitalizeFully(String str, final char... delimiters)

Converts all the delimiter separated words in a String into capitalized words, that is each word is made up of a titlecase character and then a series of lowercase characters.

final int delimLen = delimiters == null ? -1 : delimiters.length;
if (isEmpty(str) || delimLen == 0) {
    return str;
str = str.toLowerCase();
return capitalize(str, delimiters);
StringcapitalizeFully(String string)
capitalize Fully
if (string.length() == 0) {
    return string;
if (string.length() == 1) {
    return string.toUpperCase();
return string.substring(0, 1).toUpperCase() + string.substring(1).toLowerCase();
StringcapitalizeFully(String text)
capitalize Fully
String[] split = text.split(" ");
for (int i = 0; i < split.length; ++i) {
    char[] chars = split[i].toCharArray();
    chars[0] = Character.toUpperCase(chars[0]);
    split[i] = new String(chars);
return implode(split, " ");