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

Method MayUnquoteOld

library/cpp/json/json_prettifier.cpp:71–83  ·  view source on GitHub ↗

to keep arcadia tests happy

Source from the content-addressed store, hash-verified

69
70 // to keep arcadia tests happy
71 bool TJsonPrettifier::MayUnquoteOld(TStringBuf s) {
72 static str_spn alpha("a-zA-Z_@$", true);
73 static str_spn alnum("a-zA-Z_@$0-9", true);
74 static TStringBuf true0("true");
75 static TStringBuf false0("false");
76 static TStringBuf true1("on");
77 static TStringBuf false1("off");
78 static TStringBuf true2("da");
79 static TStringBuf false2("net");
80 static TStringBuf null0("null");
81
82 return !!s && alpha.chars_table[(ui8)s[0]] && alnum.cbrk(s.begin() + 1, s.end()) == s.end() && !EqualToOneOf(s, null0, true0, false0, true1, false1, true2, false2);
83 }
84
85 class TPrettifier: public TJsonCallbacks {
86 TRewritableOut Out;

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