MCPcopy Create free account
hub / github.com/catboost/catboost / MayUnquoteNew

Method MayUnquoteNew

library/cpp/json/json_prettifier.cpp:60–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 };
59
60 bool TJsonPrettifier::MayUnquoteNew(TStringBuf s) {
61 static str_spn alpha("a-zA-Z_@$", true);
62 static str_spn alnum("a-zA-Z_@$0-9.-", true);
63 static TStringBuf true0("true");
64 static TStringBuf false0("false");
65 static TStringBuf null0("null");
66
67 return !!s && alpha.chars_table[(ui8)s[0]] && alnum.cbrk(s.begin() + 1, s.end()) == s.end() && !EqualToOneOf(s, null0, true0, false0);
68 }
69
70 // to keep arcadia tests happy
71 bool TJsonPrettifier::MayUnquoteOld(TStringBuf s) {

Callers

nothing calls this directly

Calls 4

EqualToOneOfFunction · 0.85
cbrkMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected