def keyword.head

gralha-svg-render@0.1.0.1 · svg.bend:1055

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

1055def keyword.head(s: String) -> U32:
1056  match s:
1057    case SNil{}: 0
1058    case SCon{Chr{c}, t}:
1059      +ch = c
1060      U.choose(U32, U32.is_eq(U32.or(ch, 32), 105) || U32.is_eq(U32.or(ch, 32), 117), keyword.pick(SCon{Chr{ch}, t}), 0)

Uses (8)

Used by (1)