UTF-16 encoding.
More...
#include <rapidjson.h>
|
static Ch * | Encode (Ch *buffer, unsigned codepoint) |
|
template<typename CharType = wchar_t>
struct rapidjson::UTF16< CharType >
UTF-16 encoding.
http://en.wikipedia.org/wiki/UTF-16
- Template Parameters
-
CharType | Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead. |
◆ Ch
template<typename CharType = wchar_t>
◆ Encode()
template<typename CharType = wchar_t>
399 if (codepoint <= 0xFFFF) {
401 *buffer++ =
static_cast<Ch>(codepoint);
405 unsigned v = codepoint - 0x10000;
406 *buffer++ =
static_cast<Ch>((v >> 10) + 0xD800);
407 *buffer++ = (v & 0x3FF) + 0xDC00;
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:105
CharType Ch
Definition: rapidjson.h:396
References RAPIDJSON_ASSERT.
The documentation for this struct was generated from the following file: