Function spinoso_symbol::ascii_casecmp

source ·
pub fn ascii_casecmp<T, U>(
    interner: &T,
    left: U,
    right: U
) -> Result<Ordering, T::Error>
where T: Intern<Symbol = U>, U: Copy,
Expand description

Compare the byte contents of two symbols using ASCII case-insensitive comparison.

The byte slice associated with each symbol is resolved via the given interner. Unresolved symbols are compared as if they resolve to &[].

This function can be used to implement Symbol#casecmp for the Symbol type defined in Ruby Core.


If the interner returns an error while retrieving a symbol, that error is returned. See Intern::lookup_symbol.