-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new and extend existing til::string helpers (#16772)
`wstring_case_insensitive_compare` is not a great name for what it does as it's incorrect to use for regular (human readable) strings. This PR thus renames it to `env_key_sorter`. `compare_string_ordinal` was renamed to `compare_ordinal_insensitive` to make sure callers know that the comparison is insensitive (this may otherwise be incorrect in certain contexts after all). The return value was changed to match `memcmp` so that the API is detached from its underlying implementation (= NLS). `compare_linguistic_insensitive` and `contains_linguistic_insensitive` were added to sort and filter human-readable strings respectively. `prefix_split` was extended to allow for needles that are just a single character. This significantly improves the generated assembly and is also usually what someone would want to actually use. I've left the string-as-needle variant in just in case. This PR is prep-work for #2664
- Loading branch information
Showing
9 changed files
with
141 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters