aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/string/u8gcnt.c
blob: 81a0f97d65dc6718c19a1e14fb389132277a6e4e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "unicode/string.h"

size_t
u8gcnt(const char8_t *s, size_t n)
{
	size_t m = 0;
	while (u8gnext(nullptr, &s, &n))
		m++;
	return m;
}