Posted By

naehrstoff on 12/29/08


Tagged


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

sergeizen
aka
webstic
gouthamvel


Camelize String


 / Published in: Ruby
 

  1. class String
  2. def camelize
  3. self.split(/[^a-z0-9]/i).map{|w| w.capitalize}.join
  4. end
  5. end

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: naehrstoff on December 29, 2008

"bla_bla".camelize

"BlaBla"

You need to login to post a comment.