RegexGroup
struct RegexGroupimport 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.
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.
isMatchgetter
public get isMatch() : boolTrue if the group participated in the match, including an empty capture.
indexgetter
public get index() : int32The capture start in UTF-8 bytes; normal unmatched groups use -1.
lengthgetter
public get length() : int32The capture byte length; normal unmatched groups use zero.
valuegetter
public get value() : StringSliceBorrows the captured text, or an empty slice for an unmatched group.
ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.