Skip to main content

compare_os_str

Function compare_os_str 

Source
pub fn compare_os_str<A: AsRef<OsStr>, B: AsRef<OsStr>>(a: A, b: B) -> Ordering
Available on crate feature std only.
Expand description

Compare two OsStr.

The alphanumeric algorithm is used only when both values can be converted to UTF-8 with OsStr::to_str. If either value cannot be converted, this falls back to the native OsStr ordering.