Added a strncaseeq variant to the string comparison macros
This commit is contained in:
1 parent
04a1279f91
commit
7a3e0a6321
1 file changed
+6
-1
@@ -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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user