Method: String#swapcase
- Defined in:
- string.c
#swapcase ⇒ String
Returns a copy of str with uppercase alphabetic characters converted to lowercase and lowercase characters converted to uppercase.
"Hello".swapcase #=> "hELLO"
"cYbEr_PuNk11".swapcase #=> "CyBeR_pUnK11"
2958 2959 2960 |
# File 'string.c', line 2958 static VALUE rb_str_swapcase(str) VALUE str; |