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

Function UTF8Length

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

Count the number of codepoints in the given string (assuming it is valid UTF8).

Source from the content-addressed store, hash-verified

556
557/// Count the number of codepoints in the given string (assuming it is valid UTF8).
558static inline int64_t UTF8Length(const uint8_t* first, const uint8_t* last) {
559 int64_t length = 0;
560 while (first != last) {
561 length += ((*first++ & 0xc0) != 0x80);
562 }
563 return length;
564}
565
566} // namespace util
567} // namespace arrow

Callers 6

TESTFunction · 0.85
CallMethod · 0.85
PreExecMethod · 0.85
TransformMethod · 0.85
PreExecMethod · 0.85
TransformMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68