| 430 | |
| 431 | template <class UnaryOperation> |
| 432 | static 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 | |
| 447 | template <class Predicate> |
| 448 | static inline bool UTF8FindIf(const uint8_t* first, const uint8_t* last, |
no test coverage detected