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

Function UTF8Transform

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

Source from the content-addressed store, hash-verified

430
431template <class UnaryOperation>
432static inline bool UTF8Transform(const uint8_t* first, const uint8_t* last,
433 uint8_t** destination, UnaryOperation&& unary_op) {
434 const uint8_t* i = first;
435 uint8_t* out = *destination;
436 while (i < last) {
437 uint32_t codepoint = 0;
438 if (ARROW_PREDICT_FALSE(!UTF8Decode(&i, &codepoint))) {
439 return false;
440 }
441 out = UTF8Encode(out, unary_op(codepoint));
442 }
443 *destination = out;
444 return true;
445}
446
447template <class Predicate>
448static inline bool UTF8FindIf(const uint8_t* first, const uint8_t* last,

Callers 2

TransformMethod · 0.85
TransformMethod · 0.85

Calls 2

UTF8DecodeFunction · 0.85
UTF8EncodeFunction · 0.85

Tested by

no test coverage detected