Text CamelCaser


/ Published in: JavaScript
Save to your folder(s)

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

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.