package com.zjrs.appcomm.template.word.util;

public class NameUtil {

	public static String toFirstUpperCase(String name) {
		return name.substring(0, 1).toUpperCase() + name.substring(1);
	}
	
	public static String toFirstLowerCase(String name) {
		return name.substring(0, 1).toLowerCase() + name.substring(1);
	}
	
	public static String toUpperCaseCamelCase(String name) {
		String[] nameWord = name.split("_");
		String nameC = "";
		for (int i = 0; i < nameWord.length; i++) {
			nameC += nameWord[i].substring(0, 1).toUpperCase() + nameWord[i].substring(1).toLowerCase();
		}
		return nameC;
	}

	public static String toLowerCaseCamelCase(String name) {
		String nameC = toUpperCaseCamelCase(name);
		return nameC.substring(0, 1).toLowerCase() + nameC.substring(1);
	}
}
