underscore
underscore() -> string
Converts a camelized string into a series of words separated by an underscore ("_").
Example
'borderBottomWidth'.underscore();
// -> 'border_bottom_width'
Note
Used in conjunction with String#dasherize, String#underscore converts a DOM style into its CSS equivalent.
'borderBottomWidth'.underscore().dasherize();
// -> 'border-bottom-width'
© 2006-2008 Prototype Core Team
© 2009 перевод Иванов Егор
© 2009 перевод Иванов Егор