MCPcopy Create free account
hub / github.com/PABannier/bark.cpp / utf8_len

Function utf8_len

bark.cpp:487–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487static size_t utf8_len(char src) {
488 const size_t lookup[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4};
489 uint8_t highbits = static_cast<uint8_t>(src) >> 4;
490 return lookup[highbits];
491}
492
493static std::string strip_accents(const std::string& in_str) {
494 std::string out_str;

Callers 1

strip_accentsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected