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

API Browser

Method

PeekChar

static func PeekChar() -> Result<Optional<Character>, TextReadError>

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

Peeks at the next UTF-8 grapheme without advancing Console.In.

Return value

Result<Optional<Character>, TextReadError>

Returned Character, None at EOF, or a text read error.

Remarks

May read ahead to find a grapheme boundary. Shares the invocation-owned text reader.