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

#include "mbstring.h"

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