def tz.number.go

bend-kit-time@0.3.0.0 · time.bend:760

import bend-kit-time@0.3.0.0/time.bend as Time
import Base

760# Three digits suffice for POSIX hour, day, and month fields.
761def tz.number.go(s: String, +acc: U32, +seen: Bool) -> Maybe<&2, TzField>:
762  match s:
763    case SNil{}:
764      tz.number.stop(seen, acc, SNil{})
765    case SCon{Chr{+c}, +t}:
766      tz.number.step(Bool.and(tz.digit(c), U32.is_lt(acc, 100)),
767        c, t, acc, seen, _ => tz.number.go(t, ((acc * 10 + c - 48) : U32), True{}))

Uses (14)

Used by (1)