Java String Capitalize capitalize(String word)

Here you can find the source of capitalize(String word)

Description

capitalize

License

GNU General Public License

Declaration

public static String capitalize(String word) 

Method Source Code

//package com.java2s;
// This file is part of MarMoT, which is licensed under GPLv3.

public class Main {
    public static String capitalize(String word) {
        StringBuilder sb = new StringBuilder(word);
        sb.setCharAt(0, Character.toUpperCase(sb.charAt(0)));
        return sb.toString();
    }/*  w w w .  j a  va  2s .  c  om*/
}

Related

  1. capitalize(String word)
  2. capitalize(String word)
  3. capitalize(String word)
  4. capitalize(String word)
  5. capitalize(String word)
  6. capitalize(String words)
  7. capitalize(StringBuilder text)
  8. capitalizeAt(StringBuilder builder, int index)
  9. capitalizeClass(String className)