Console.Input

Model console input as a buffer. Note that we read UTF8 only.

Members

Aliases

get
alias get = copyln
Undocumented in source.

Functions

copyln
mstring copyln(bool raw)

Return the next line available from the console, or null when there is nothing available. The value returned is a duplicate of the buffer content (it has .dup applied).

input
InputStream input()

Returns the configured source

input
Input input(InputStream source)

Divert input to an alternate source.

readln
bool readln(cstring content, bool raw)

Retreive a line of text from the console and map it to the given argument. The input is sliced, not copied, so use .dup appropriately. Each line ending is removed unless parameter raw is set to true.

redirected
bool redirected()

Is this device redirected?

redirected
Input redirected(bool yes)

Set redirection state to the provided boolean.

stream
InputStream stream()

Return the associated stream.

Meta