6 #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
7 #define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
9 #ifndef NO_LOCALE_SUPPORT
21 #ifdef NO_LOCALE_SUPPORT
24 struct lconv* lc = localeconv();
25 return lc ? *(lc->decimal_point) :
'\0';
37 result[0] =
static_cast<char>(cp);
38 }
else if (cp <= 0x7FF) {
40 result[1] =
static_cast<char>(0x80 | (0x3f & cp));
41 result[0] =
static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
42 }
else if (cp <= 0xFFFF) {
44 result[2] =
static_cast<char>(0x80 | (0x3f & cp));
45 result[1] =
static_cast<char>(0x80 | (0x3f & (cp >> 6)));
46 result[0] =
static_cast<char>(0xE0 | (0xf & (cp >> 12)));
47 }
else if (cp <= 0x10FFFF) {
49 result[3] =
static_cast<char>(0x80 | (0x3f & cp));
50 result[2] =
static_cast<char>(0x80 | (0x3f & (cp >> 6)));
51 result[1] =
static_cast<char>(0x80 | (0x3f & (cp >> 12)));
52 result[0] =
static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
78 *--current =
static_cast<char>(value % 10U +
static_cast<unsigned>(
'0'));
99 if (decimalPoint !=
'\0' && decimalPoint !=
'.') {
100 while (begin < end) {
102 *begin = decimalPoint;
111 #endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED