aboutsummaryrefslogtreecommitdiff
path: root/lib/mbstring/u8cmp.c
blob: 732896c2956aafa422f041ac39a826333d04ca89 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <string.h>

#include "mbstring.h"

int
u8cmp(struct u8view x, struct u8view y)
{
	if (x.len != y.len)
		return x.len > y.len ? +1 : -1;
	return memcmp(x.p, y.p, x.len);
}