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); }