Posted By

d3lity on 05/02/13


Tagged

camelcase


Versions (?)

Text CamelCaser


 / Published in: JavaScript
 

"Text you want to make CamelCase" => "TextYouWantToMakeCamelCase"

Used this for making better addresses from blog-post titles.

  1. "Text you want to make CamelCase".replace(/ [^ ]+/g,function(match){
  2. return match.substring(1,2).toUpperCase()+match.substring(2);
  3. });

Report this snippet  

You need to login to post a comment.