Improve upperCaseFirst stability.
This commit is contained in:
parent
03545624e4
commit
b0f9eee41d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user