Skip to content

Commit

Permalink
simplified lang uppercase function
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed Nov 13, 2024
1 parent 17e212a commit 4ae6a10
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ private String convertToName(String key) {
StringBuilder builder = new StringBuilder(key.substring(0, 1).toUpperCase() + key.substring(1));
for(int i = 1; i < builder.length(); i++) {
if(builder.charAt(i) == '_') {
builder.deleteCharAt(i);
builder.replace(i, i + 1, " " + Character.toUpperCase(builder.charAt(i)));
builder.replace(i, i + 2, " " + Character.toUpperCase(builder.charAt(i + 1)));
}
}

Expand Down

0 comments on commit 4ae6a10

Please sign in to comment.