当前位置:网站首页>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 !
边栏推荐
- What is ttfb
- Construction of Flink development environment and wordcount
- Cypress 88359 WL command enable hotspot
- [new open source project] dynamic configuration task scheduling framework gobrs async joins the dromara open source community
- How to state clearly and concisely the product requirements?
- 蓝桥杯_小蓝吃糖果_鸽巢原理 / 抽屉原理
- One line of code solves the problem that the time to fetch datetime from MySQL database is less than eight hours
- Go 语言的优势和学习路线图
- 13. numeric array
- Wechat template message errCode ": 40165," errmsg ":" invalid web pagepath
猜你喜欢
![[new open source project] dynamic configuration task scheduling framework gobrs async joins the dromara open source community](/img/26/2d0c4e8f7f4055e614080fe526328c.png)
[new open source project] dynamic configuration task scheduling framework gobrs async joins the dromara open source community

The new colleague asked me what "where 1=1" means???

牛客网:数组中只出现一次的两个数字

13. numeric array

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

js 内存泄漏

Link list of high frequency written interview question brushing summary (distribution explanation & code annotation)

Arduino使用NRF24L01模块进行无线通信

CPT 102_ LEC 17

弄懂了采矿业与碳中和的逻辑,就读懂了矿区无人驾驶的千亿市场
随机推荐
Necessity for banks to choose electronic bidding procurement
Navicat premium 15 tool is automatically deleted by anti-virus protection software solution
Openjudge noi 1.13 17: text layout
One line of code solves the problem that the time to fetch datetime from MySQL database is less than eight hours
[new open source project] dynamic configuration task scheduling framework gobrs async joins the dromara open source community
巴歇尔槽流量计远程采集物联网关在明渠流量监测的应用
Byte beating | the first batch of written examination for game R & D post (question solution)
TCP/IP
Introduction to the functions of today's headline search webmaster platform (portal)
Databinding escaping with presentation symbols
What is the difference between a database unique index and a common index?
牛客网:数组中只出现一次的两个数字
AOSP ~ Logcat Chatty 行过期
13. numeric array
从绿联冲刺IPO,看手机配件市场沉浮录
[MySQL 45 lecture -12] lecture 12 the reason why MySQL has a wind attack from time to time
JS memory leak
RS232/RS485转4G DTU 上传基于Modbus协议的温湿度传感器数据到远程TCP服务器
DNS Optimization Practice of APP network optimization
CPT 102_ LEC 16