mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2026-03-22 07:28:25 +08:00
fix: 大写下滑下列名转驼峰问题
修改前: CREATE_TIME -> cREATETIME 修改后: CREATE_TIME -> createTime
This commit is contained in:
@@ -47,7 +47,7 @@ public class StringUtils {
|
|||||||
result.append(Character.toUpperCase(ch));
|
result.append(Character.toUpperCase(ch));
|
||||||
flag = false;
|
flag = false;
|
||||||
} else {
|
} else {
|
||||||
result.append(ch);
|
result.append(Character.toLowerCase(ch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public class FooTest {
|
|||||||
System.out.println(StringUtils.toUnderline("UserName",true));
|
System.out.println(StringUtils.toUnderline("UserName",true));
|
||||||
System.out.println(StringUtils.toUnderline("user_NameGgg_x-UUU",true));
|
System.out.println(StringUtils.toUnderline("user_NameGgg_x-UUU",true));
|
||||||
System.out.println(StringUtils.toUnderline("username",true));
|
System.out.println(StringUtils.toUnderline("username",true));
|
||||||
|
|
||||||
|
System.out.println(StringUtils.underlineToCamelCase("CREATE_TIME"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user