aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring/u8len.c
blob: 217ab66b8ba52f20e50c634d04f442f4aca21376 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "mbstring.h"

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