str.swapcase â new_str
Instance Public methods
Returns a copy of str with uppercase alphabetic characters converted to lowercase and lowercase characters converted to uppercase. Note: case conversion is effective only in ASCII region.
1 2 | "Hello" .swapcase #=> "hELLO" "cYbEr_PuNk11" .swapcase #=> "CyBeR_pUnK11" |
Please login to continue.