MCPcopy Create free account
hub / github.com/Kitware/VTK / doesAnyCharRequireEscaping

Function doesAnyCharRequireEscaping

ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp:4269–4275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4267String valueToString(bool value) { return value ? "true" : "false"; }
4268
4269static bool doesAnyCharRequireEscaping(char const* s, size_t n) {
4270 assert(s || !n);
4271
4272 return std::any_of(s, s + n, [](unsigned char c) {
4273 return c == '\\' || c == '"' || c < 0x20 || c > 0x7F;
4274 });
4275}
4276
4277static unsigned int utf8ToCodepoint(const char*& s, const char* e) {
4278 const unsigned int REPLACEMENT_CHARACTER = 0xFFFD;

Callers 1

valueToQuotedStringNFunction · 0.85

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected