Java Utililty Methods String Capitalize

List of utility methods to do String Capitalize

Description

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

Method

Stringcapitalise(String string)
capitalise
if (string == null) {
    return null;
int stringLength = string.length();
if (stringLength == 0) {
    return string;
StringBuffer capitalisedString = new StringBuffer(stringLength);
...
Stringcapitalise(String string)
capitalise
return capitalise(string, true);
Stringcapitalise(String string)
Capitalizes the first letter of a String
String[] parts = string.split(" ");
for (int i = 0; i < parts.length; i++) {
    parts[i] = parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1);
return combineSplit(0, parts, " ");
Stringcapitalise(String toCapitalise)
capitalise
return toCapitalise.replaceFirst("" + toCapitalise.charAt(0),
        "" + Character.toUpperCase(toCapitalise.charAt(0)));
voidcapitaliseAndCheckBases(byte[] bases, boolean strict)
capitalise And Check Bases
for (int i = 0; i < bases.length; i++) {
    switch (bases[i]) {
    case 'A':
    case 'C':
    case 'G':
    case 'T':
    case 'N':
        break;
...
Stringcapitalised(String name)
Capitalise the first character of the input string.
char suffix[] = name.toCharArray();
suffix[0] = Character.toUpperCase(suffix[0]);
return new String(suffix);
StringcapitaliseName(String name)
capitalise Name
return name.substring(0, 1).toUpperCase() + name.substring(1);
Stringcapitalizar(String s)
capitalizar
if (s.length() == 0) {
    return s;
return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase();
StringcapitalizarPalabra(String palabra)
capitalizar Palabra
if (palabra == null || palabra.isEmpty()) {
    return palabra;
} else {
    return palabra.substring(0, 1).toUpperCase() + palabra.substring(1).toLowerCase();
StringcapitalizarTexto(String texto)
capitalizar Texto
if (texto == null || texto.isEmpty()) {
    return texto;
String[] palabras = texto.split("\\s");
StringBuilder sb = new StringBuilder();
for (String palabra : palabras) {
    sb.append(capitalizarPalabra(palabra));
    sb.append(" ");
...