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

Function UTF8ForEach

cpp/src/arrow/util/utf8_internal.h:518–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516
517template <class UnaryFunction>
518static inline bool UTF8ForEach(const uint8_t* first, const uint8_t* last,
519 UnaryFunction&& f) {
520 const uint8_t* i = first;
521 while (i < last) {
522 uint32_t codepoint = 0;
523 if (ARROW_PREDICT_FALSE(!UTF8Decode(&i, &codepoint))) {
524 return false;
525 }
526 f(codepoint);
527 }
528 return true;
529}
530
531template <class UnaryFunction>
532static inline bool UTF8ForEach(const std::string& s, UnaryFunction&& f) {

Callers 1

UTF8TrimStateMethod · 0.85

Calls 4

UTF8DecodeFunction · 0.85
fFunction · 0.85
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected