Method: String#capitalize
- Defined in:
- lib/source/ruby.rb
#capitalize ⇒ Object
call-seq:
str.capitalize -> string
Returns a copy of str with the first character converted to uppercase and the remainder to lowercase.
'abcdef'.capitalize #=> "Abcdef"
'ABCDEF'.capitalize #=> "Abcdef"
'123ABC'.capitalize #=> "123abc"
5453 5454 5455 5456 |
# File 'lib/source/ruby.rb', line 5453 def capitalize `var v=this.__value__` `$q(v.slice(0,1).toUpperCase()+v.slice(1,v.length).toLowerCase())` end |