| 516 | |
| 517 | template <class UnaryFunction> |
| 518 | static 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 | |
| 531 | template <class UnaryFunction> |
| 532 | static inline bool UTF8ForEach(const std::string& s, UnaryFunction&& f) { |
no test coverage detected