Add function cw_stricmp

FossilOrigin-Name: b11dc8075a7ca248bff1e0afa5277b70ae7703d85bc0b16b717e5b6e6fc04e45
This commit is contained in:
7u83@mail.ru 2018-04-04 07:01:28 +00:00
parent bec5a882ef
commit fd893751ee
2 changed files with 13 additions and 0 deletions

View File

@ -502,6 +502,7 @@ int cw_put_msg(struct conn *conn, uint8_t * rawout);
char *cw_strdup(const char *s);
int cw_strcicmp(char const *a, char const *b);
/**

12
src/cw/cw_stricmp.c Normal file
View File

@ -0,0 +1,12 @@
#include <ctype.h>
#include "cw.h"
int cw_strcicmp(char const *a, char const *b)
{
for (;; a++, b++) {
int d = tolower(*a) - tolower(*b);
if (d != 0 || !*a)
return d;
}
}