Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Member group

ReadLine

Declaring type: Console
Module: System
Assembly: System.Runtime.dll
Source file: Console.rvn

Overloads / Variants

ReadLine

static func ReadLine() -> Result<Optional<string>, TextReadError>

Source file: Console.rvn

Returns a Task; await completion. Reads one bounded strict UTF-8 line.

Return value

Result<Optional<String>, TextReadError>

Some text, including empty text for an empty line; None for EOF before any data; or TextReadError.

Remarks

The parameterless overload uses 65536. LF and CRLF delimit lines; a lone CR is data. ReadLine itself adds no read-ahead past LF; it consumes any retained character-read lookahead first. A limit error consumes input without rollback. Unavailable input maps to IoFailure. See StreamReader.ReadLine.

ReadLine

static func ReadLine(maxUtf8Bytes: int) -> Result<Optional<string>, TextReadError>

Source file: Console.rvn

Returns a Task; await completion. Reads one bounded strict UTF-8 line.

Parameters

Name Type Description
maxUtf8Bytes Int32 Maximum returned UTF-8 bytes, from 0 through 65536.

Return value

Result<Optional<String>, TextReadError>

Some text, including empty text for an empty line; None for EOF before any data; or TextReadError.

Remarks

The parameterless overload uses 65536. LF and CRLF delimit lines; a lone CR is data. ReadLine itself adds no read-ahead past LF; it consumes any retained character-read lookahead first. A limit error consumes input without rollback. Unavailable input maps to IoFailure. See StreamReader.ReadLine.