From c95b3937fef3e2c63768f1b3b1dc2c898f23d91d Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 22 Jul 2020 11:37:03 -0400 Subject: add upstream 11.0 --- zen/zstring.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zen/zstring.h') diff --git a/zen/zstring.h b/zen/zstring.h index e262603e..adfd671b 100644 --- a/zen/zstring.h +++ b/zen/zstring.h @@ -28,7 +28,7 @@ using Zstringc = zen::Zbase; // - different UTF-8 encoding length of upper-case chars // - different number of upper case chars (e.g. "ߢ => "SS" on macOS) // - output is Unicode-normalized -Zstring makeUpperCopy(const Zstring& str); +Zstring getUpperCase(const Zstring& str); //Windows, Linux: precomposed //macOS: decomposed @@ -43,11 +43,11 @@ Zstring replaceCpyAsciiNoCase(const Zstring& str, const Zstring& oldTerm, const //------------------------------------------------------------------------------------------ -inline bool equalNoCase(const Zstring& lhs, const Zstring& rhs) { return makeUpperCopy(lhs) == makeUpperCopy(rhs); } +inline bool equalNoCase(const Zstring& lhs, const Zstring& rhs) { return getUpperCase(lhs) == getUpperCase(rhs); } struct ZstringNoCase //use as STL container key: avoid needless upper-case conversions during std::map<>::find() { - ZstringNoCase(const Zstring& str) : upperCase(makeUpperCopy(str)) {} + ZstringNoCase(const Zstring& str) : upperCase(getUpperCase(str)) {} Zstring upperCase; std::strong_ordering operator<=>(const ZstringNoCase& other) const = default; -- cgit