Is there any ready function which converts camel case Strings into underscore separated string?

I want something like this:

"CamelCaseString".to_underscore      

to return “camel_case_string”.

12 Answers
12

Leave a Reply

Your email address will not be published. Required fields are marked *