struct

VT::Scanner

Inherits Struct < Value < Object

src/vt/scanner.cr A zero-allocation utility for extracting semicolon-delimited arguments from string payloads.

Constructors

new(payload : String)

Initializes a scanner mapped to the provided string payload.

Source

Instance methods

complete?

Returns true if the entire payload has been consumed.

Source
next_action

Extracts the next single-byte character and advances past the delimiter.

Source
next_bool

Extracts the next numeric token and interprets it as a boolean. Represents 1 as true, and any other value as false.

Source
next_i32

Extracts the next numeric token as a signed 32-bit integer.

Source
next_str

Extracts the remainder of the token up to the next semicolon delimiter and returns it as a string slice without allocating new heap memory.

Source
next_u32

Extracts the next numeric token as an unsigned 32-bit integer.

Source
valid?

Returns true if the scanner is in a valid state and parsing can continue.

Source