mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 00:50:25 +02:00
Add Peek to StreamReader class
This commit is contained in:
parent
e146475a39
commit
9ce0cc217a
1 changed files with 11 additions and 0 deletions
|
@ -182,6 +182,17 @@ namespace System.IO
|
||||||
return .Ok;
|
return .Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Result<char8> Peek()
|
||||||
|
{
|
||||||
|
if (mStream == null)
|
||||||
|
return .Err;
|
||||||
|
if (mCharPos == mCharLen)
|
||||||
|
{
|
||||||
|
if (Try!(ReadBuffer()) == 0) return .Err;
|
||||||
|
}
|
||||||
|
return mCharBuffer[mCharPos + 1];
|
||||||
|
}
|
||||||
|
|
||||||
public Task<String> ReadLineAsync()
|
public Task<String> ReadLineAsync()
|
||||||
{
|
{
|
||||||
// If we have been inherited into a subclass, the following implementation could be incorrect
|
// If we have been inherited into a subclass, the following implementation could be incorrect
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue