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
char[] 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).

readln
bool readln(char[] 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.

Properties

input
InputStream input [@property getter]

Returns the configured source

input
InputStream input [@property setter]

Divert input to an alternate source.

redirected
bool redirected [@property getter]

Is this device redirected?

redirected
bool redirected [@property setter]

Set redirection state to the provided boolean.

stream
InputStream stream [@property getter]

Return the associated stream.

Meta