Text.strip0: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/usage/text.bend as Text Lines 70-76 of cswap-bend-cli@0.1.0.0/usage/text.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/usage/text.bend&start_line=70&end_line=76 import Base # Leading zeros dropped, keeping at least one digit. def strip0(s: String) -> String: match s: case SNil{}: "0" case SCon{+c, +t}: strip0.pick(Char.is_eq(c, '0'), Bool.not(String.is_empty(t)), c, t, strip0(t)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/usage/text.bend&name=strip0.pick