From 0300b42dbcb2ff74846e8a65f6a6ea119bc1612b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Sat, 28 Sep 2024 11:51:04 +0200 Subject: [PATCH] enh: respect POCO_NO_WSTRING in String.h --- Foundation/include/Poco/String.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Foundation/include/Poco/String.h b/Foundation/include/Poco/String.h index 4b68afbfc..5fe74c1b9 100644 --- a/Foundation/include/Poco/String.h +++ b/Foundation/include/Poco/String.h @@ -21,7 +21,9 @@ #include "Poco/Foundation.h" #include "Poco/Ascii.h" #include +#if !defined(POCO_NO_WSTRING) #include +#endif #include @@ -55,6 +57,9 @@ inline std::size_t cstrlen(const char* str) } +#if !defined(POCO_NO_WSTRING) + + inline std::size_t cstrlen(const wchar_t* str) /// Returns the length of a zero-terminated C string. /// This implementation calls std::wcslen(). @@ -63,6 +68,9 @@ inline std::size_t cstrlen(const wchar_t* str) } +#endif + + template S trimLeft(const S& str) /// Returns a copy of str with all leading @@ -808,8 +816,10 @@ void secureClear(T& str) } // namespace Poco + #if defined(__clang__) && ((__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ >= 6)) # pragma clang diagnostic pop #endif + #endif // Foundation_String_INCLUDED