MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / readString

Method readString

opt_utils/src/json.cpp:1243–1268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1241 }
1242
1243 void Parser::readString()
1244 {
1245 if (json.at(cursor) != '"')
1246 return;
1247
1248 std::string str;
1249
1250 ++cursor;
1251
1252 char c1 = '\0', c2 = '\0';
1253 for (; cursor < jsonSize; ++cursor)
1254 {
1255 c2 = json.at(cursor);
1256
1257 if (c1 != '\\' && c2 == '"')
1258 {
1259 break;
1260 }
1261
1262 str += c2;
1263
1264 c1 = c2;
1265 }
1266
1267 data.push(MakePair(Value::VT_STRING, str));
1268 }
1269 bool Parser::interpretValue(const std::string &value)
1270 {
1271 std::string upperValue(value.size(), '\0');

Callers

nothing calls this directly

Calls 2

MakePairFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected