def text.digits.cmp

ezsys@0.1.0.0 · src/str.bend:490

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

490# two digit strings in numeric order: leading zeros dropped, then the
491# longer is the greater, and two of one length compare digit by digit
492def text.digits.cmp(lhs: String, rhs: String) -> Cmp:
493  +x = text.digits.trim(lhs)
494  +y = text.digits.trim(rhs)
495  text.digits.by(Nat.cmp(String.length(x), String.length(y)), x, y)

Uses (6)

Used by (1)