class String

Public Instance Methods

blank?() click to toggle source

A string is blank if it's empty or contains whitespaces only:

"".blank?                 # => true
"   ".blank?              # => true
" something here ".blank? # => false
# File lib/fission/core_ext/object.rb, line 98
def blank?
  self !~ /\S/
end