Added a strncaseeq variant to the string comparison macros

This commit is contained in:
Martin Willi
2011-01-05 16:45:59 +01:00
parent 04a1279f91
commit 7a3e0a6321
+6 -1
View File
@@ -57,7 +57,7 @@
#define streq(x,y) (strcmp(x, y) == 0)
/**
* Macro compares two strings for equality
* Macro compares two strings for equality, length limited
*/
#define strneq(x,y,len) (strncmp(x, y, len) == 0)
@@ -66,6 +66,11 @@
*/
#define strcaseeq(x,y) (strcasecmp(x, y) == 0)
/**
* Macro compares two strings for equality ignoring case, length limited
*/
#define strncaseeq(x,y,len) (strncasecmp(x, y, len) == 0)
/**
* Macro compares two binary blobs for equality
*/