← Standard library

RegexGroup

struct RegexGroup
import RegexGroup from Wax;

One regex capture with a match flag and byte range into retained source text. A successful zero-length capture differs from an unmatched group: inspect isMatch, not only length.

Regex.wax:783

Members

constructorconstructor

public constructor (string source, int32 index, int32 length, bool matched)

Stores the source string, byte range, and match flag. A matched range must be valid UTF-8 boundaries within the source before its value is read.

Regex.wax:793

isMatchgetter

public get isMatch() : bool

True if the group participated in the match, including an empty capture.

Regex.wax:803

indexgetter

public get index() : int32

The capture start in UTF-8 bytes; normal unmatched groups use -1.

Regex.wax:807

lengthgetter

public get length() : int32

The capture byte length; normal unmatched groups use zero.

Regex.wax:811

valuegetter

public get value() : StringSlice

Borrows the captured text, or an empty slice for an unmatched group.

Regex.wax:816

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.