Airship\Engine\Security\Util::stringLength PHP Method

stringLength() public static method

Binary-safe strlen() implementation
public static stringLength ( string $str ) : integer
$str string
return integer
    public static function stringLength(string $str) : int
    {
        return Binary::safeStrlen($str);
    }

Usage Example

Beispiel #1
0
 /**
  * @param string $input
  * @return string
  * @throws \TypeError
  */
 public static function nonEmpty(string $input) : string
 {
     if (Util::stringLength($input) < 1) {
         throw new \TypeError();
     }
     return $input;
 }
All Usage Examples Of Airship\Engine\Security\Util::stringLength