Android examples for java.lang:String Case
Convert string lower Case and handle null value
import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.net.URLEncoder; import java.security.SecureRandom; import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Locale; public class Main{ /**//from w w w .jav a2 s . c o m * * <pre> * StringUtil.lowerCase(null) = null * StringUtil.lowerCase("") = "" * StringUtil.lowerCase("aBc") = "abc" * </pre> * */ public static String lowerCase(String str) { if (str == null) { return null; } return str.toLowerCase(); } }