/*** * Change the name from underline to hump * * @param para * Underline named string */ public static String
UnderlineToHump(String para){ StringBuilder result=new StringBuilder(); String a
[]=para.split("_"); for(String s:a){ if (!para.contains("_")) { result.append(s)
; continue; } if(result.length()==0){ result.append(s.toLowerCase()); }else{
result.append(s.substring(0, 1).toUpperCase()); result.append(s.substring(1).
toLowerCase()); } } return result.toString(); } /*** * Hump naming changed to underline naming * * @param
para * Hump named string */ public static String HumpToUnderline(String para){
StringBuilder sb=new StringBuilder(para); int temp=0;// location if (!para.contains("_"
)) { for(int i=0;i<para.length();i++){ if(Character.isUpperCase(para.charAt(i)))
{ sb.insert(i+temp, "_"); temp+=1; } } } return sb.toString().toUpperCase(); }
Operation results :
"CLIENT_NO" Name the hump :clientNo "clientNo" Change to underline :CLIENT_NO

©2019-2020 Toolsou All rights reserved,
In the problem of target detection “ recall Recall”,“ Accuracy Precision”Linux Page replacement algorithm C Language implementation About wechat payment body( Product description ) Problems encountered stay Vue Use in Web Worker Calculate the working days of each month c++ Memory Pointer out of bounds detection mechanism _CrtMemBlockHeadeJavaScript Medium Call and Apply Remember once EventBus Project issues caused by memory leaks Hundreds of millions of locusts rarely collide Locusts want to be self driving Heroes Java Swing JList: List box components