Java tutorial
//package com.java2s; // This copy of Ice is licensed to you under the terms described in the public class Main { public static String formatUsername(String in) { try { in = in.substring(0, 1).toUpperCase() + in.substring(1, in.length()).toLowerCase(); } catch (IndexOutOfBoundsException ex) { } return in; } }