Method
StringBuffer::unread
Puts $chunk back at the front of the buffer, to be read first.
Description#
public StringBuffer::unread(
string $chunk
): voidParameters#
- $chunk string
- Bytes that were read and not used
Errors / Exceptions#
| Exception | When |
|---|---|
LogicException | If the buffer has ended and is empty |
See also#
StringBuffer::readFixedReturns exactly$lengthbytes, and waits until that many are buffered.