fix: 大写下滑下列名转驼峰问题

修改前: CREATE_TIME -> cREATETIME
修改后: CREATE_TIME -> createTime
This commit is contained in:
L&J
2024-01-24 22:02:23 +08:00
parent e008e4df4e
commit 64fbaade24
2 changed files with 3 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ public class StringUtils {
result.append(Character.toUpperCase(ch));
flag = false;
} else {
result.append(ch);
result.append(Character.toLowerCase(ch));
}
}
}

View File

@@ -19,6 +19,8 @@ public class FooTest {
System.out.println(StringUtils.toUnderline("UserName",true));
System.out.println(StringUtils.toUnderline("user_NameGgg_x-UUU",true));
System.out.println(StringUtils.toUnderline("username",true));
System.out.println(StringUtils.underlineToCamelCase("CREATE_TIME"));
}