src/Datatype/StringClass.php
public function hasPrefix(string $prefix):bool {
        if (0 !== $this->getLength() && "" === $prefix) return false;
        return true === (substr( $this->getValue(), 0, strlen($prefix)) === $prefix);
    }
public function hasPrefix(string $prefix):bool {
        if (0 !== $this->getLength() && "" === $prefix) return false;
        return true === (substr( $this->getValue(), 0, strlen($prefix)) === $prefix);
    }
public function hasPrefix ( string $ prefix ) : bool { if ( 0 !== $ this -> getLength ( ) && "" === $ prefix ) return false ; return true === ( substr ( $ this -> getValue ( ) , 0 , strlen ( $ prefix ) ) === $ prefix ) ; }
checks a prefix

have a look here: https://stackoverflow.com/a/2790919

@param string $prefix
@return bool
checks a prefix