def text.digits.trim

ezsys@0.1.0.0 · src/str.bend:470

import ezsys@0.1.0.0/src/str.bend as Str
import Base

470# the text with its leading '0's removed
471def text.digits.trim(txt: String) -> String:
472  match txt:
473    case SNil{}:
474      SNil{}
475    case SCon{+h, +t}:
476      text.digits.zero.if(Char.is_eq(h, '0'), h, t,
477        _u => text.digits.trim(t))

Uses (4)

Used by (1)