How to deal with the hump of underlined string in String
String how to deal with underlined string hump, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Private static Pattern linePattern = Pattern.compile ("_ (\\ w)"); / * underline to hump * / public static String lineToHump (String str) {str = str.toLowerCase (); Matcher matcher = linePattern.matcher (str); StringBuffer sb = new StringBuffer (); while (matcher.find ()) {matcher.appendReplacement (sb, matcher.group (1). ToUpperCase ());} matcher.appendTail (sb) Return sb.toString ();} is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.