the current code of Compare::compare_no_case for &str does a to_lowercase on the input and the tag to compare to. This does not take into account complex cases when doing an uppercase or lowercase on an UTF-8 string.
The caseless crate provides methods to do caseless comparisons.
Things to check for:
- if the input is not large enough, we do a partial match on a prefix. But the prefix should not be obtained before matching since the length before and after case folding
- once the match is done, how to convert the size to before case folding, since a sub slice must be calculated
- put that version behind a compiler flag?