MCPcopy Create free account
hub / github.com/Samsung/UTopia / isAnyCharRequiredQuoting

Function isAnyCharRequiredQuoting

external/jsoncpp/jsoncpp.cpp:4252–4262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4250String valueToString(bool value) { return value ? "true" : "false"; }
4251
4252static 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
4264static unsigned int utf8ToCodepoint(const char *&s, const char *e) {
4265 const unsigned int REPLACEMENT_CHARACTER = 0xFFFD;

Callers 1

valueToQuotedStringNFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected