COMMON: Add contains overload for char32_t in String

This commit is contained in:
Thierry Crozat 2020-10-31 16:45:33 +00:00
parent 7b7bea9fe5
commit 23ce3edac9
2 changed files with 9 additions and 0 deletions

View File

@ -176,6 +176,12 @@ bool String::contains(uint32 x) const {
return false;
}
#ifdef USE_CXX11
bool String::contains(char32_t x) const {
return contains((uint32)x);
}
#endif
#ifndef SCUMMVM_UTIL
bool String::matchString(const char *pat, bool ignoreCase, bool pathMode) const {

View File

@ -118,6 +118,9 @@ public:
bool contains(const char *x) const;
bool contains(char x) const;
bool contains(uint32 x) const;
#ifdef USE_CXX11
bool contains(char32_t x) const;
#endif
/**
* Simple DOS-style pattern matching function (understands * and ? like used in DOS).