MCPcopy Create free account
hub / github.com/apache/arrow / ConsumeWhitespace

Function ConsumeWhitespace

cpp/src/arrow/json/chunker.cc:40–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace rj = arrow::rapidjson;
39
40static size_t ConsumeWhitespace(string_view view) {
41#ifdef RAPIDJSON_SIMD
42 auto data = view.data();
43 auto nonws_begin = rj::SkipWhitespace_SIMD(data, data + view.size());
44 return nonws_begin - data;
45#else
46 auto ws_count = view.find_first_not_of(" \t\r\n");
47 if (ws_count == string_view::npos) {
48 return view.size();
49 } else {
50 return ws_count;
51 }
52#endif
53}
54
55/// RapidJson custom stream for reading JSON stored in multiple buffers
56/// http://rapidjson.org/md_doc_stream.html#CustomStream

Callers 1

FindLastMethod · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected