Skip to main content

cmp_code_points

Function cmp_code_points 

Source
pub fn cmp_code_points(a: &str, b: &str) -> Ordering
Expand description

Compare two strings by code point. Rust str Ord IS UTF-8 byte order which equals Unicode code-point order, so we can delegate to the native comparison. Kept as a named function to make the normative choice explicit.