On Aug 19, 2006, at 10:49 AM, Joshua Muheim wrote:

> Hi all
>
> What's the fastest way to convert "ThisIsSomeString" to
> "this_is_some_string"?
>
> Thanks for help,
> Joshua
>
> -- 
> Posted via http://www.ruby-forum.com/.
>

I like to do string.split(/(?=[A-Z])/).map { |s| s.downcase }.join('_')