Function natord::compare_iter
[−]
[src]
pub fn compare_iter<T, L, R, Skip, Cmp, ToDigit>(
left: L,
right: R,
skip: Skip,
cmp: Cmp,
to_digit: ToDigit
) -> Ordering where
L: Iterator<Item = T>,
R: Iterator<Item = T>,
Skip: for<'a> FnMut(&'a T) -> bool,
Cmp: for<'a> FnMut(&'a T, &'a T) -> Ordering,
ToDigit: for<'a> FnMut(&'a T) -> Option<isize>,
Compares two iterators of "characters" possibly containing "digits". The natural ordering can be customized with the following parameters:
skip
returns true if the "character" does not affect the comparison, other than splitting two consecutive digits.cmp
compares two "characters", assuming that they are not "digits".to_digit
converts a "character" into a "digit" if possible. The digit of zero is special.