/**
* Method to read a given number of bytes starting at the current position
* and moving to the end of the string defined by the current position plus the
* given number.
*
* @param integer $count Bytes of data from the current position should be returned.
*
* @return string
*
* @since 1.7.0
*
* @link https://www.php.net/manual/en/streamwrapper.stream-read.php
*/
public function stream_read($count)
{
$result = substr($this->currentString, $this->pos, $count);
$this->pos += $count;
return $result;
}