shadow:io

Class TextInput

Parent class

shadow:standard@Object

Interfaces

shadow:io@CanClose

class TextInput

Create Summary

Modifiers Return Types Method and Description
public () create(CanRead reader)

Destroy Summary

Modifiers Return Types Method and Description
public () destroy()

Method Summary

Modifiers Return Types Method and Description
public () close()

Close underlying reader, if possible.

public readonly (TextInput) copy(AddressMap addresses)
public (ubyte, boolean) readByte()

Reads the next byte from stdin.

public (code, boolean) readCode()

Reads the next UTF-8 code point from stdin.

public (double) readDouble()

Reads the next white-spaced delimited text from stdin and converts that value to a double.

public (int) readInt()

Reads the next white-spaced delimited text from stdin and converts that value to an int.

public (String, boolean) readLine()

Reads the next line of text from the underlying reader, stopping when a new line or line feed character is reached.

public (String, boolean) readString()

Reads the next white-spaced delimited text from the underlying reader, stopping when a space, a tab, a new line, or a line feed character is reached.

Create Detail

create

public create(CanRead reader) => ()

Destroy Detail

destroy

public destroy() => ()

Method Detail

close

public close() => ()

Close underlying reader, if possible.

copy

public readonly copy(AddressMap addresses) => (TextInput)

readByte

public readByte() => (ubyte, boolean)

Reads the next byte from stdin.

Returns

next byte

true if the end of the file was reached

readCode

public readCode() => (code, boolean)

Reads the next UTF-8 code point from stdin.

Returns

character as a code

true if the end of the file was reached

readDouble

public readDouble() => (double)

Reads the next white-spaced delimited text from stdin and converts that value to a double.

Returns

text converted to double

Throws

NumberFormatException - if the text does not represent a legal double

readInt

public readInt() => (int)

Reads the next white-spaced delimited text from stdin and converts that value to an int.

Returns

text converted to int

Throws

NumberFormatException - if the text does not represent a legal int

readLine

public readLine() => (String, boolean)

Reads the next line of text from the underlying reader, stopping when a new line or line feed character is reached.

Returns

line as a String

true if the end of the file was reached

readString

public readString() => (String, boolean)

Reads the next white-spaced delimited text from the underlying reader, stopping when a space, a tab, a new line, or a line feed character is reached.

Returns

text as a String

true if the end of the file was reached