def value_cut

cli@0.2.0.0 · cli.bend:5351

import cli@0.2.0.0/cli.bend as Cli
import Base

5351# Where an option's value or repeat starts: " <", "[=", or a final "...".
5352def value_cut(s: String) -> Nat:
5353  match s:
5354    case SNil{}: 0n
5355    case SCon{Chr{32}, SCon{Chr{60}, tail}}: 0n
5356    case SCon{Chr{91}, SCon{Chr{61}, tail}}: 0n
5357    case SCon{Chr{46}, SCon{Chr{46}, SCon{Chr{46}, SNil{}}}}: 0n
5358    case SCon{head, tail}: 1n+value_cut(tail)

Uses (7)

Used by (3)