LineReader custom delimiter
userqq opened this issue · comments
userqq commented
Hi.
It would be great to have possibility use custom delimiters in LineReader, e.g.
final class LineReader
{
...
public function __construct(InputStream $inputStream, $delimiter = "\n")
...
}
$reader = new \Amp\ByteStream\LineReader($stream, "\x0a\x00");
Niklas Keller commented
Looks like a useful addition. However, it needs some special consideration for \rtrim($line, "\r");
which shouldn't be applied in that case. Do you want to provide a PR?