mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 00:20: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
|
@ -181,6 +181,17 @@ namespace System.IO
|
|||
|
||||
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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue