aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring/u8next.c
blob: 82d2ad737a843b9762b99fb8f5856b5539ec4a72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "mbstring.h"

int
u8next(rune *ch, const char8_t **s, size_t *n)
{
	rune _;
	int m = 0;

	if (*n) {
		m = u8tor(ch ? ch : &_, *s);
		*n -= m;
		*s += m;
	}

	return m;
}