public function startsWith(Value $value, $insensitive = false)
    {
        $value = $value->getValue();
        $valueLength = strlen($value);

        if (!empty($this->value) && !empty($value) && strlen($this->value) >= $valueLength) {
            return substr_compare($this->value, $value, 0, $valueLength, $insensitive) === 0;
        }

        return false;
    }
public function startsWith(Value $value, $insensitive = false)
    {
        $value = $value->getValue();
        $valueLength = strlen($value);

        if (!empty($this->value) && !empty($value) && strlen($this->value) >= $valueLength) {
            return substr_compare($this->value, $value, 0, $valueLength, $insensitive) === 0;
        }

        return false;
    }
public function startsWith ( Value $ value , $ insensitive = false ) { $ value = $ value -> getValue ( ) ; $ valueLength = strlen ( $ value ) ; if ( ! empty ( $ this -> value ) && ! empty ( $ value ) && strlen ( $ this -> value ) >= $ valueLength ) { return substr_compare ( $ this -> value , $ value , 0 , $ valueLength , $ insensitive ) === 0 ; } return false ; }
String StartsWith comparison.

@param Value $value       Value object to compare against
@param bool  $insensitive Perform a case-insensitive comparison (default: false)

@return boolean
String StartsWith comparison .