mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
enh: respect POCO_NO_WSTRING in String.h
This commit is contained in:
parent
a5d6034ab9
commit
0300b42dbc
@ -21,7 +21,9 @@
|
|||||||
#include "Poco/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
#include "Poco/Ascii.h"
|
#include "Poco/Ascii.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#if !defined(POCO_NO_WSTRING)
|
||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
|
#endif
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
@ -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)
|
inline std::size_t cstrlen(const wchar_t* str)
|
||||||
/// Returns the length of a zero-terminated C string.
|
/// Returns the length of a zero-terminated C string.
|
||||||
/// This implementation calls std::wcslen().
|
/// This implementation calls std::wcslen().
|
||||||
@ -63,6 +68,9 @@ inline std::size_t cstrlen(const wchar_t* str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
template <class S>
|
template <class S>
|
||||||
S trimLeft(const S& str)
|
S trimLeft(const S& str)
|
||||||
/// Returns a copy of str with all leading
|
/// Returns a copy of str with all leading
|
||||||
@ -808,8 +816,10 @@ void secureClear(T& str)
|
|||||||
|
|
||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#if defined(__clang__) && ((__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ >= 6))
|
#if defined(__clang__) && ((__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ >= 6))
|
||||||
# pragma clang diagnostic pop
|
# pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_String_INCLUDED
|
#endif // Foundation_String_INCLUDED
|
||||||
|
Loading…
Reference in New Issue
Block a user