We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f349456 commit 6e2e5c7Copy full SHA for 6e2e5c7
include/rapidjson/internal/strfunc.h
@@ -16,6 +16,7 @@
16
#define RAPIDJSON_INTERNAL_STRFUNC_H_
17
18
#include "../stream.h"
19
+#include <cwchar>
20
21
RAPIDJSON_NAMESPACE_BEGIN
22
namespace internal {
@@ -34,6 +35,16 @@ inline SizeType StrLen(const Ch* s) {
34
35
return SizeType(p - s);
36
}
37
38
+template <>
39
+inline SizeType StrLen(const char* s) {
40
+ return SizeType(std::strlen(s));
41
+}
42
+
43
44
+inline SizeType StrLen(const wchar_t* s) {
45
+ return SizeType(std::wcslen(s));
46
47
48
//! Returns number of code points in a encoded string.
49
template<typename Encoding>
50
bool CountStringCodePoint(const typename Encoding::Ch* s, SizeType length, SizeType* outCount) {
0 commit comments