src/Buffer.php
protected function getDelimiter($limit)
    {
        if ($limit === '') {
            throw new \InvalidArgumentException();
        }

        $pos = strpos($this->data, $limit);
        if ($pos === false) {
            return null;
        }

        $pos += strlen($limit);
        $res = substr($this->data, 0, $pos);
        $this->data = (string) substr($this->data, $pos);
        return $res;
    }
protected function getDelimiter($limit)
    {
        if ($limit === '') {
            throw new \InvalidArgumentException();
        }

        $pos = strpos($this->data, $limit);
        if ($pos === false) {
            return null;
        }

        $pos += strlen($limit);
        $res = substr($this->data, 0, $pos);
        $this->data = (string) substr($this->data, $pos);
        return $res;
    }
protected function getDelimiter ( $ limit ) { if ( $ limit === '' ) { throw new \ InvalidArgumentException ( ) ; } $ pos = strpos ( $ this -> data , $ limit ) ; if ( $ pos === false ) { return null ; } $ pos += strlen ( $ limit ) ; $ res = substr ( $ this -> data , 0 , $ pos ) ; $ this -> data = ( string ) substr ( $ this -> data , $ pos ) ; return $ res ; }
Return a delimited string from the buffer.

\param string $limit
Delimiter.

\retval string
All the data at the beginning of the buffer
up to (and including) the delimiter.

\retval null
The given delimiter does not appear
in the buffer.
Return a delimited string from the buffer .