Example #1
0
 /**
  * Checks if a string is (null) or contains whitespaces only.
  *
  * @param string $str The string to check.
  * @param string $character_mask The custom list of whitespace characters to use.
  *
  * @return bool Is (null) / empty or not.
  */
 public static final function isNullOrWhitespace($str, $character_mask = null) : bool
 {
     if (null === $str) {
         return true;
     }
     if (!$str instanceof IString) {
         $str = new self($str);
     }
     return $str->isWhitespace($character_mask);
 }