MCPcopy Create free account
hub / github.com/boostorg/parser / file_slurp

Function file_slurp

example/callback_json.cpp:279–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279std::string file_slurp(std::ifstream & ifs)
280{
281 std::string retval;
282 while (ifs) {
283 char const c = ifs.get();
284 retval += c;
285 }
286 if (!retval.empty() && retval.back() == -1)
287 retval.pop_back();
288 return retval;
289}
290
291// This is our callbacks-struct. It has a callback for each of the kinds of
292// callback rules in our parser. If one were missing, you'd get a pretty

Callers 1

mainFunction · 0.70

Calls 3

backMethod · 0.80
getMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected