aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/lib/mbstring/u8len.c
blob: 14539e8c3f2a75771c58dceb3313938ef114aab8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "mbstring.h"

size_t
u8len(const char8_t *s, size_t n)
{
	rune unused;
	size_t m = 0;

	while (u8next(&unused, &s, &n))
		m++;

	return m;
}