yii\validators\IpValidator::parseNegatedRange PHP Méthode

parseNegatedRange() private méthode

Parses IP address/range for the negation with [[NEGATION_CHAR]].
private parseNegatedRange ( $string ) : array
$string
Résultat array `[0 => bool, 1 => string]` - boolean: whether the string is negated - string: the string without negation (when the negation were present)
    private function parseNegatedRange($string)
    {
        $isNegated = strpos($string, static::NEGATION_CHAR) === 0;
        return [$isNegated, $isNegated ? substr($string, strlen(static::NEGATION_CHAR)) : $string];
    }