当前位置:网站首页>Stringutils string tool class used by FreeMarker to create templates
Stringutils string tool class used by FreeMarker to create templates
2022-06-11 02:59:00 【b348858003】
package Utils;
public class StringUtils {
/**
* Capitalize the name of the class
* @param name
* @param indx
* @return
*/
public static String captureName(String name,int indx){
name=name.substring(0,indx)+name.substring(indx,indx+1).toUpperCase()+name.substring(indx+1);
return name;
}
/**
* The first capital letter is
* @param name
* @return
*/
public static String captureName(String name){
name=name.substring(0,1).toUpperCase()+name.substring(1);
return name;
}
/**
* The first letter is lowercase
* @param name
* @return
*/
public static String lowerName(String name){
name=name.substring(0,1).toLowerCase()+name.substring(1);
return name;
}
/**
* Processed class name , Capitalize the name of the class , Underline out
* @param columnName
* @return
*/
public static String putOffUnderline(String columnName){
StringBuffer fieldNameBuffer=null;
String temNameArray[]=columnName.split("_");
for(int i=0;i<temNameArray.length;i++){
if(i==0){
fieldNameBuffer=new StringBuffer(temNameArray[i]);
}else{
fieldNameBuffer.append(captureName(temNameArray[i]));
}
}
return fieldNameBuffer.toString();
}
}
Must see the dry goods
link : Except for receiving private orders , Blogging , Outside the tutorial , How programmers use their technology , Make money lying down !
边栏推荐
- CPT 102_LEC 18
- 那些笑着离开“北上广”的人,为何最后都哭了?
- What is the difference between a database unique index and a common index?
- 反射三种方式
- CPT 102_ LEC 16
- [MySQL 45 -10] Lesson 10 how MySQL selects indexes
- CPT 102_LEC 20
- ROS基础 - 使用 launch 文件(一) - 批量启动多个ROS节点
- Manon's advanced road - Daily anecdotes
- How to fix syntax errors in WordPress websites
猜你喜欢

Istio installation and use
![[resolved] how to fix another update in progress WordPress upgrade error](/img/b1/7b9945c1a623c20288f0d232cbb0c4.jpg)
[resolved] how to fix another update in progress WordPress upgrade error

基于互联网架构演进, 构建秒杀系统

怎样简洁明了地说清楚产品需求?

When the interviewer opens his mouth, he comes to compose. Is this the case now?

巴歇尔槽流量计远程采集物联网关在明渠流量监测的应用

微信小程序

The two request sessionids of the same user are inconsistent ----- record the problem

【新晋开源项目】动态配置化任务编排框架 Gobrs-Async 加入Dromara开源社区

CPT 102_LEC 16
随机推荐
Istio installation and use
AOSP - Developer mode is enabled by default
牛客网:数组中只出现一次的两个数字
你的公司会选择开发数据中台吗?
GraphAcademy 课程讲解:《Neo4j 图数据科学基础》
CPT 102_LEC 16
AOSP ~ modify WebView default implementation
Cypress 88359 WL command enable hotspot
Correct posture of cocoscreator's native secondary development
【长时间序列预测】Aotoformer 代码详解之[3]模型整体架构分析
Go语言之Go 快速入门篇(一):第一个 Go 程序
How can Delma's own brand "take off" when Philips is listed on the market?
AOSP ~ 修改WebView默认实现
20220610 Friday
error exepected identifier before ‘(‘ token, grpc 枚举类编译错误
Young people fleeing big cities: shouldering housing prices and pressure, but not epidemics
Databinding escaping with presentation symbols
Three special data types, day3 and redis (geographic location, cardinality statistics and bitmap scene usage)
新来的同事问我 where 1=1 是什么意思???
OpenJudge NOI 1.13 18:Tomorrow never knows?