Here you can find the source of titleCase(String s)
Parameter | Description |
---|---|
s | a parameter |
private static String titleCase(String s)
//package com.java2s; //License from project: LGPL public class Main { /**//from w ww. j a v a 2 s . co m * Returns a title case version of the String. * * @param s * @return */ private static String titleCase(String s) { if (s.length() > 1) { return s.substring(0, 1).toUpperCase() + s.substring(1); } return s.toUpperCase(); } }