swoole_buffer->substr

从缓冲区中取出内容。

string swoole_buffer->substr(int $offset, int $length = -1, bool $remove = false);

swoole_buffer->substr() 会复制一次内存
$remove 后内存并没有释放,只是底层进行了指针偏移。当销毁此对象时才会真正释放内存
1.9.4及之后的版本里,swoole_buffer->substr() 能够在某些情况下触发 swoole_buffer->recycle()