pub fn cmp_dec<T: Integer>(lhs: T, rhs: T) -> OrderingExpand description
Lexicographically compares the digits of two integers in their decimal representation.
This yields the same result as lhs.to_string().cmp(&rhs.to_string()) without heap allocation.
ยงExample
assert!(fmt_cmp::cmp_dec::<u32>(42, 3).is_gt());
assert!(fmt_cmp::cmp_dec::<u32>(24, 3).is_lt());