match multimethod
Methods
- match(val:Any, pattern:Any) Source: stdlib.ngs:8512
Used by match EXPR { ... } construct to check whether the expression matches the case. %AUTO match EXPR { ... } Returns
val =~ patternExample
r = match x { Int "Got integer" /^a/ "Got special string" Str "Got regular string" }