Change string to upper case in place : upcase « String « Ruby






Change string to upper case in place


string = 'My first string'                   # => "My first string"

string.upcase!                           # => "MY FIRST STRING"

 








Related examples in the same category

1.Call upcase function from string class on a sentence
2.upcase does not change the original string
3.Call upcase function from string on a word
4.upcase or upcase!