VOOZH about

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

⇱ Ruby | Symbol capitalize function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Symbol capitalize function

Last Updated : 10 Dec, 2019
Symbol#capitalize() : capitalize() is a Symbol class method which returns the capitalized form of symbol based on the position of next capital form.
Syntax: Symbol.capitalize() Parameter: Symbol values Return: the capitalized form of symbol based on the position of next capital form.
Example #1 : Output :
Symbol a : aBcDeF

Symbol b : äöü

Symbol c : ABCDEF



Symbol a capitalize form : Abcdef

Symbol b capitalize form : äöü

Symbol c capitalize form : Abcdef

Example #2 : Output :
Symbol a : geeks

Symbol b : åöó

Symbol c : GEEKS



Symbol a capitalize form : Geeks

Symbol b capitalize form : åöó

Symbol c capitalize form : Geeks

Comment
Article Tags: