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

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