Add function cw_stricmp
FossilOrigin-Name: b11dc8075a7ca248bff1e0afa5277b70ae7703d85bc0b16b717e5b6e6fc04e45
This commit is contained in:
parent
bec5a882ef
commit
fd893751ee
@ -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
12
src/cw/cw_stricmp.c
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user