def len_ok

bend-schema-lib@0.4.1.0 · core.bend:352

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

352# r is a string whose length is in the bounds: what conforms reads at an
353# SStrLen, and what len_err refuses exactly when it fails.
354def len_ok(+lo: Nat, +hi: Nat, r: Raw) -> Bool:
355  match r:
356    case RStr{+x}:
357      str_len_ok(lo, hi, x)
358    case _:
359      False{}

Uses (4)

Used by (2)