/ Published in: Java

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Pattern p = Pattern.compile("(^|\\W)([a-z])"); Matcher m = p.matcher(s.toLowerCase()); while(m.find()) { m.appendReplacement(sb, m.group(1) + m.group(2).toUpperCase() ); } m.appendTail(sb); return sb.toString(); }
URL: http://www.theeggeadventure.com/wikimedia/index.php/Java_Proper_Case
Comments
