def clamp_text.fin
import cswap-bend-cli@0.1.0.0/setload.bend as Setloadimport Base
import cswap-bend-cli@0.1.0.0/settings.bend as Settings
303# A numeric flag clamped into the setting's range, as Settings.repr text; None for
304# text that is not a number.
305def clamp_text.fin(m: Maybe<&2, Settings.Dec>, lo: String, hi: String) -> Maybe<&2, String>:
306 match m:
307 case Some{d}:
308 Some{Settings.repr(Settings.clamp(d, Settings.lit(lo), Settings.lit(hi)))}
309 case None{}:
310 None{}