rustdoc::html::render::print_item

Function compare_names

Source
pub(crate) fn compare_names(left: &str, right: &str) -> Ordering
Expand description

Compare two strings treating multi-digit numbers as single units (i.e. natural sort order).

This code is copied from rustfmt, and should probably be released as a crate at some point.