Method: String#upcase
- Defined in:
- string.c
#upcase ⇒ String
Returns a copy of str with all lowercase letters replaced with their uppercase counterparts. The operation is locale insensitive—only characters “a” to “z” are affected. Note: case replacement is effective only in ASCII region.
"hEllO".upcase #=> "HELLO"
5272 5273 5274 5275 5276 5277 5278 |
# File 'string.c', line 5272 static VALUE rb_str_upcase(VALUE str) { str = rb_str_dup(str); rb_str_upcase_bang(str); return str; } |