package com.temenos.soa.plugin.uml2dsconverter.utils;

// General String utilities
public class StringUtils {

	/**
	 * Turns the first character of a string in to an uppercase character 
	 * @param source The source string
	 * @return String Resultant string
	 */
	public static String upperInitialCharacter(String source) {
    	final StringBuilder result = new StringBuilder(source.length());    
    	result.append(Character.toUpperCase(source.charAt(0))).append(source.substring(1));
    	return result.toString();
	}	

	/**
	 * Turns the first character of a string in to a lowercase character 
	 * @param source The source string
	 * @return String Resultant string
	 */
	public static String lowerInitialCharacter(String source) {
    	final StringBuilder result = new StringBuilder(source.length());    
    	result.append(Character.toLowerCase(source.charAt(0))).append(source.substring(1));
    	return result.toString();
	}
}
