VOOZH about

URL: https://www.geeksforgeeks.org/ruby/ruby-symbol-swapcase-function/

⇱ Ruby | Symbol swapcase function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Symbol swapcase function

Last Updated : 10 Dec, 2019
Symbol#swapcase() : swapcase() is a Symbol class method which inverts the writing case of the symbol object.
Syntax: Symbol.swapcase() Parameter: Symbol values Return: inverts the writing case of the symbol object. upper to lower and lower to upper
Example #1 : Output :
Symbol a : aBcDeF

Symbol b : äöü

Symbol c : ABCDEF



Symbol a swapcase form : AbCdEf

Symbol b swapcase form : äöü

Symbol c swapcase form : abcdef

Example #2 : Output :
Symbol a : geeks

Symbol b : åöó

Symbol c : GEEKS



Symbol a swapcase form : GEEKS

Symbol b swapcase form : åöó

Symbol c swapcase form : geeks

Comment
Article Tags: