Read
Declaring type: SyncStreamReader
Module: System.IO
Assembly: System.Runtime.dll
Source file: SyncStreamReader.rvn
Overloads / Variants
Read
func Read(count: int, maxUtf8Bytes: int) -> Result<string, TextReadError>
Source file: SyncStreamReader.rvn
Implements SyncTextReader.Read
Reads a requested number of graphemes with a separate UTF-8 byte bound.
Parameters
| Name | Type | Description |
|---|---|---|
count |
Int32 | Grapheme count, from zero through 65536. |
maxUtf8Bytes |
Int32 | Maximum returned UTF-8 bytes, from zero through 65536. |
Return value
The requested text, a shorter remainder at EOF, or TextReadError.
Remarks
Zero count consumes nothing. Invalid bounds consume nothing. A result-limit error retains buffered text for retry; decoding/I/O errors do not rewind the source. Concurrent reads return Busy.
Read
func Read(count: int) -> Result<string, TextReadError>
Source file: SyncStreamReader.rvn
Implements SyncTextReader.Read
Reads a requested number of graphemes with a separate UTF-8 byte bound.
Parameters
| Name | Type | Description |
|---|---|---|
count |
Int32 | Grapheme count, from zero through 65536. |
Return value
The requested text, a shorter remainder at EOF, or TextReadError.
Remarks
Zero count consumes nothing. Invalid bounds consume nothing. A result-limit error retains buffered text for retry; decoding/I/O errors do not rewind the source. Concurrent reads return Busy.