yii\validators\IpValidator::parseNegatedRange PHP Method

parseNegatedRange() private method

Parses IP address/range for the negation with [[NEGATION_CHAR]].
private parseNegatedRange ( $string ) : array
$string
return 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];
    }