Input

open class Input<Char>

Abstracts the input source which is being parsed, and presents itself as a random access vector of characters of type Char.

  • Empty initializer.

    Declaration

    Swift

    public init()
  • Accesses the character at the given position.

    Declaration

    Swift

    open subscript(position: Int) -> Char? { get }

    Parameters

    position

    The position of the character in the input.

    Return Value

    The character at the given position. If the position is outside the range of the input, in particular at the end of the input, nil is returned.