PhpOrient\Protocols\Binary\Serialization\CSV::eatSet PHP Method

eatSet() protected static method

Consume a set of values.
protected static eatSet ( string $input ) : array
$input string The input to consume
return array The collected set and any remaining content.
    protected static function eatSet($input)
    {
        $set = [];
        $cluster = null;
        while (strlen($input)) {
            $c = $input[0];
            if ($c === ',') {
                $input = substr($input, 1);
            } elseif ($c === '>') {
                $input = substr($input, 1);
                break;
            }
            $chunk = self::eatValue($input);
            $set[] = $chunk[0];
            $input = $chunk[1];
        }
        return [$set, $input];
    }