Subversion Repositories eFlore/Applications.coel

Rev

Rev 674 | Rev 948 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
619 gduche 1
package org.tela_botanica.client.util;
2
 
3
public class UtilString {
4
 
5
	/**
6
	 *  Mets la première lettre d'une chaine en majuscule
7
	 *
8
	 *  @param chaineDeCaractere
9
	 *  @result ChaineDeCaractere
10
	 */
11
 
12
	public static String ucFirst(String inputStr)	{
13
 
798 gduche 14
		if (isEmpty(inputStr))	{
674 gduche 15
			return "";
16
		}
17
 
619 gduche 18
		return inputStr.substring(0,1).toUpperCase() + inputStr.substring(1, inputStr.length());
19
	}
798 gduche 20
 
21
	public static boolean isEmpty(String inputStr)	{
22
 
23
		return inputStr == null || inputStr.equals("");
24
	}
619 gduche 25
}