6 #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED
7 #define LIB_JSONCPP_JSON_TOOL_H_INCLUDED
9 #if !defined(JSON_IS_AMALGAMATION)
14 #ifdef NO_LOCALE_SUPPORT
15 #define JSONCPP_NO_LOCALE_SUPPORT
18 #ifndef JSONCPP_NO_LOCALE_SUPPORT
30 #ifdef JSONCPP_NO_LOCALE_SUPPORT
33 struct lconv* lc = localeconv();
34 return lc ? *(lc->decimal_point) :
'\0';
46 result[0] = static_cast<char>(cp);
47 }
else if (cp <= 0x7FF) {
49 result[1] = static_cast<char>(0x80 | (0x3f & cp));
50 result[0] = static_cast<char>(0xC0 | (0x1f & (cp >> 6)));
51 }
else if (cp <= 0xFFFF) {
53 result[2] = static_cast<char>(0x80 | (0x3f & cp));
54 result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
55 result[0] = static_cast<char>(0xE0 | (0xf & (cp >> 12)));
56 }
else if (cp <= 0x10FFFF) {
58 result[3] = static_cast<char>(0x80 | (0x3f & cp));
59 result[2] = static_cast<char>(0x80 | (0x3f & (cp >> 6)));
60 result[1] = static_cast<char>(0x80 | (0x3f & (cp >> 12)));
61 result[0] = static_cast<char>(0xF0 | (0x7 & (cp >> 18)));
84 *--current = static_cast<char>(value % 10U + static_cast<unsigned>(
'0'));
95 for (; begin != end; ++begin) {
105 if (decimalPoint ==
'\0' || decimalPoint ==
'.') {
108 for (; begin != end; ++begin) {
110 *begin = decimalPoint;
120 for (; begin != end; --end) {
121 if (*(end - 1) !=
'0') {
125 if (begin != (end - 1) && *(end - 2) ==
'.') {
134 #endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED