← Standard library

MatchIterator

struct MatchIterator
import MatchIterator from Wax;

An iterator over non-overlapping matches retaining the expression and input text. Empty matches advance the next search by one code point. Check HasNext before calling MoveNext.

Regex.wax:826

Members

constructorconstructor

public constructor (Regex re, string text, int32 startAt)

Starts a match search at the supplied byte offset, following Regex.IsMatchAt boundary rules.

Regex.wax:844

HasNextmethod

public fn HasNext() : bool

Reports whether a pending match is available without consuming it.

Regex.wax:891

MoveNextmethod

public fn MoveNext() : Match

Returns the pending match and searches for the next one. Call only while HasNext is true.

Regex.wax:898

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.