aboutsummaryrefslogtreecommitdiffstats
path: root/strcaseends.c
blob: a672b0af0391005b6849e906985a97f45361dbe9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* See LICENSE file for copyright and license details. */
#include "libsimple.h"


int
libsimple_strcaseends(const char *s, const char *t)
{
	size_t sn = strlen(s);
	size_t tn = strlen(t);
	if (tn > sn)
		return 0;
	return !strcasecmp(&s[sn - tn], t);
}