array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'swoole-buffer.substr.php', 1 => 'Swoole\\Buffer::substr', 2 => 'Read data from the memory buffer based on offset and length. Or remove data from the memory buffer.', ), 'up' => array ( 0 => 'class.swoole-buffer.php', 1 => 'Swoole\\Buffer', ), 'prev' => array ( 0 => 'swoole-buffer.recycle.php', 1 => 'Swoole\\Buffer::recycle', ), 'next' => array ( 0 => 'swoole-buffer.tostring.php', 1 => 'Swoole\\Buffer::__toString', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/swoole/swoole/buffer/substr.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Swoole\Buffer::substr

(PECL swoole >= 1.9.0)

Swoole\Buffer::substrRead data from the memory buffer based on offset and length. Or remove data from the memory buffer.

Beschreibung

public Swoole\Buffer::substr(int $offset, int $length = ?, bool $remove = ?): string

If $remove is set to be true and $offset is set to be 0, the data will be removed from the buffer. The memory for storing the data will be released when the buffer object is deconstructed.

Parameter-Liste

offset

The offset.

length

The length.

remove

Whether to remove the data from the memory buffer.

Rückgabewerte

The data or string readed from the memory buffer.