def text.digits.cmp
import ezsys@0.1.0.0/src/str.bend as Strimport 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)