case - luxembourg/muxcode-clm GitHub Wiki

CASE()

FUNCTION: case(<str>[,<pat1>,<res1>]...[,<dflt>])

case() is similar to switch() but does not perform wildcard matching (i.e., using * or ? in the pattern). In cases where wildcards are not needed, it performs marginally faster.

Before <resI> is evaluated for return, #$ is substituted with the value of <str>. In this way, <resI> has a short-hand way of getting at the <str> that matched its corresponding pattern.

Related Topics: @switch, match, ifelse, switch