Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/netsuite/core_ext/string/lower_camelcase.rb
Instance Method Summary collapse
Instance Method Details
#lower_camelcase ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/netsuite/core_ext/string/lower_camelcase.rb', line 2 def lower_camelcase str = dup str.gsub!(/\/(.?)/) { "::#{$1.upcase}" } str.gsub!(/(?:_+|-+)([a-z]|[0-9])/) { $1.upcase } str.gsub!(/(\A|\s)([A-Z])/) { $1 + $2.downcase } str end |