MatchSuccess type

Successful match result

Direct parent types

MatchResult
Successful or unsuccessful match result
Direct subtypes: 2

Direct children types

ParamsMatchY
Undocumented

Methods

[](ms:MatchSuccess, name:Str) Source: stdlib.ngs:1014
Get capture by name
[](ms:MatchSuccess, idx:Int) Source: stdlib.ngs:7594
Convenience method to access matches in MatchSuccess

Example

("abc" ~ /a(.)c/)[1]  # "b"
Bool(ms:MatchSuccess) Source: stdlib.ngs:999
Undocumented

Returns

true
get(ms:MatchSuccess, idx:Int, dflt:Any=null) Source: stdlib.ngs:7597
Get indexed match, returning dflt is the match is not found
init(ms:MatchSuccess, matches:Arr, pattern:Any) Source: stdlib.ngs:1008
Successful match constructor