Class: String

Inherits:
Object show all
Defined in:
opal/fron/core_ext/string.rb

Overview

String

Instance Method Summary collapse

Instance Method Details

#camelizeString

Returns the camelized version of self

Returns:

  • (String)

    The camelized version


6
7
8
9
10
# File 'opal/fron/core_ext/string.rb', line 6

def camelize
  `#{self}.replace(/(?:-|_|(\/))([a-z\d]*)/gi,function(m,first,second){
    return second.charAt(0).toUpperCase() + second.substr(1).toLowerCase()
  })`
end