Skip to content

MatchIterator

[Source]

MatchIterator allows for calling code to repeatedly perform the same match against a subject string as an iterator. This lets callers repeat the match until no more matches exist.

class ref MatchIterator is
  Iterator[Match ref] ref

Implements


Constructors

create

[Source]

Creates a new Match Iterator from a regular expression and a subject string.

new ref create(
  regex': Regex box,
  subject': String val,
  offset': USize val = 0)
: MatchIterator ref^

Parameters

Returns


Public Functions

has_next

[Source]

Indicates whether there is another match available.

fun box has_next()
: Bool val

Returns


next

[Source]

Yields the next match to the regular expression or produces an error if there is no match.

fun ref next()
: Match ref ?

Returns