class String
def blank?
Experimental RBS support (using type sampling data from the type_fusion project).
def blank?: () -> bool
This signature was generated using 526 samples from 3 applications.
-
(true, false)-
def blank? # The regexp that matches blank strings is expensive. For the case of empty # strings we can speed up this method (~3.5x) with an empty? call. The # penalty for the rest of strings is marginal. empty? || begin BLANK_RE.match?(self) rescue Encoding::CompatibilityError ENCODED_BLANKS[self.encoding].match?(self) end end