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
+20
View File
@@ -40,6 +40,26 @@ public:
using Superclass = cmsys::SystemTools;
using Encoding = cmProcessOutput::Encoding;
/**
* Return a lower case string
*/
static std::string LowerCase(cm::string_view);
static std::string LowerCase(char const* s)
{
return LowerCase(cm::string_view{ s });
}
using cmsys::SystemTools::LowerCase;
/**
* Return an upper case string
*/
static std::string UpperCase(cm::string_view);
static std::string UpperCase(char const* s)
{
return UpperCase(cm::string_view{ s });
}
using cmsys::SystemTools::UpperCase;
/**
* Look for and replace registry values in a string
*/