Java String Capitalize capitalize(String s)

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

Description

capitalize

License

Apache License

Declaration

private static String capitalize(String s) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static String capitalize(String s) {
        char first = s.charAt(0);
        return Character.isTitleCase(first) ? s : Character.toTitleCase(first) + s.substring(1);
    }/* w  w w . j a  va2  s  .c om*/
}

Related

  1. capitalize(String s)
  2. capitalize(String s)
  3. capitalize(String s)
  4. capitalize(String s)
  5. capitalize(String s)
  6. capitalize(String s)
  7. capitalize(String s)
  8. capitalize(String s)
  9. capitalize(String s)