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

eatBinary() protected static method

Consume a binary field.
protected static eatBinary ( string $input ) : array
$input string The input to consume
return array The collected binary and any remaining content.
    protected static function eatBinary($input)
    {
        $length = strlen($input);
        $collected = '';
        for ($i = 0; $i < $length; $i++) {
            $c = $input[$i];
            if ($c === '_' || $c === ',' || $c === ')' || $c === '>' || $c === '}' || $c === ']') {
                break;
            } else {
                $collected .= $c;
            }
        }
        return [$collected, substr($input, $i + 1)];
    }