Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
16
using namespace base;
17
18
int 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
27
TEST(String, Utf8Conversion)
28
{
Callers
1
TEST
Function · 0.85
Calls
1
next
Method · 0.45
Tested by
no test coverage detected