VOOZH about

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

⇱ Ruby | Symbol empty? function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Ruby | Symbol empty? function

Last Updated : 10 Dec, 2019
Symbol#empty?() : empty?() is a Symbol class method which checks whether the symbol is empty.
Syntax: Symbol.empty?() Parameter: Symbol values Return: true - if symbol is empty otherwise return false
Example #1 : Output :
Symbol a : aBcDeF

Symbol b : äöü

Symbol c : ABCDEF



Symbol a empty? form : false

Symbol b empty? form : false

Symbol c empty? form : false

Example #2 : Output :
Symbol a : geeks

Symbol b : åöó

Symbol c : 



Symbol a empty? form : false

Symbol b empty? form : false

Symbol c empty? form : true

Comment
Article Tags: