v0.3.4a: added a safety check to capitalize
This commit is contained in:
committed by
Evan Debenham
parent
7c8247577e
commit
789f8e31a8
@@ -145,7 +145,8 @@ public class Messages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String capitalize( String str ){
|
public static String capitalize( String str ){
|
||||||
return Character.toTitleCase( str.charAt( 0 ) ) + str.substring( 1 );
|
if (str.length() == 0) return str;
|
||||||
|
else return Character.toTitleCase( str.charAt( 0 ) ) + str.substring( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//Words which should not be capitalized in title case, mostly prepositions which appear ingame
|
//Words which should not be capitalized in title case, mostly prepositions which appear ingame
|
||||||
|
|||||||
Reference in New Issue
Block a user