StringBuffer newName = new StringBuffer();
//包含_的字段将首字母变为大写
if (name.contains("_")) {
String[] split = name.split("_");
for (int i = 0; i < split.length; i++) {
if (i == 0) {
newName.append(split[0]);
} else {
newName.append(split[i].substring(0, 1).toUpperCase() + split[i].substring(1));
}
}
column2.setPropertyName(newName.toString());
} else {
column2.setPropertyName(name);
}
10-18
1751
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-11
829
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交