Fixed name capitalization
This commit is contained in:
1 parent
3dc3ab05a7
commit
50fe3d8066
1 file changed
+3
-1
@@ -24,6 +24,8 @@ public class Utilities {
|
|||||||
|
|
||||||
public static String formatName(String name) {
|
public static String formatName(String name) {
|
||||||
name = name.toLowerCase().replaceAll("_", " ");
|
name = name.toLowerCase().replaceAll("_", " ");
|
||||||
return name.replace(name.charAt(0), Character.toUpperCase(name.charAt(0)));
|
if (name.length() == 1)
|
||||||
|
return name.toUpperCase();
|
||||||
|
return name.substring(0, 1).toUpperCase() + name.substring(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user