1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

Add additional string case functions

Add function to perform case-insensitive comparison of two string-view
instancess. Add functions to perform case conversion on string_view.
This commit is contained in:
Matthew Woehlke
2023-08-29 16:02:48 -04:00
committed by Brad King
parent fe7b414916
commit 3e9f96079d
5 changed files with 62 additions and 3 deletions

View File

@@ -43,6 +43,13 @@ private:
std::string const Test_;
};
/**
* Test if two strings are identical, ignoring case.
*
* Note that this is not guaranteed to work correctly on non-ASCII strings.
*/
bool cmStrCaseEq(cm::string_view a, cm::string_view b);
/** Returns true if the character @a ch is a whitespace character. **/
inline bool cmIsSpace(char ch)
{