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

#include "macros.h"
#include "mbstring.h"

bool
u8haspfx(u8view_t sv, u8view_t pfx)
{
	return sv.len >= pfx.len && memeq(sv.p, pfx.p, pfx.len);
}