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

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

bool
u8hassfx(u8view_t sv, u8view_t sfx)
{
	return sv.len >= sfx.len && memeq(sv.p + sv.len - sfx.len, sfx.p, sfx.len);
}