| 4250 | String valueToString(bool value) { return value ? "true" : "false"; } |
| 4251 | |
| 4252 | static bool isAnyCharRequiredQuoting(char const *s, size_t n) { |
| 4253 | assert(s || !n); |
| 4254 | |
| 4255 | char const *const end = s + n; |
| 4256 | for (char const *cur = s; cur < end; ++cur) { |
| 4257 | if (*cur == '\\' || *cur == '\"' || *cur < ' ' || |
| 4258 | static_cast<unsigned char>(*cur) < 0x80) |
| 4259 | return true; |
| 4260 | } |
| 4261 | return false; |
| 4262 | } |
| 4263 | |
| 4264 | static unsigned int utf8ToCodepoint(const char *&s, const char *e) { |
| 4265 | const unsigned int REPLACEMENT_CHARACTER = 0xFFFD; |
no outgoing calls
no test coverage detected