MCPcopy Create free account
hub / github.com/aseprite/laf / count_utf8_codepoints

Function count_utf8_codepoints

base/string_tests.cpp:18–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace base;
17
18int count_utf8_codepoints(const std::string& str)
19{
20 int count = 0;
21 utf8_decode dec(str);
22 while (dec.next())
23 ++count;
24 return count;
25}
26
27TEST(String, Utf8Conversion)
28{

Callers 1

TESTFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected