Improve upperCaseFirst stability.

This commit is contained in:
Olof Larsson 2013-06-28 07:31:15 +02:00
parent 03545624e4
commit b0f9eee41d

View File

@ -209,6 +209,8 @@ public class Txt
public static String upperCaseFirst(String string)
{
if (string == null) return null;
if (string.length() == 0) return string;
return string.substring(0, 1).toUpperCase()+string.substring(1);
}