Add mg_strcasecmp()

CL: Add mg_strcasecmp()

PUBLISHED_FROM=cd2a26fa12473bfa0f5e7a0a1d34fb86562ee082
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2019-12-29 19:39:45 +00:00
1 parent 10b11b03a8
commit 70dc6d8dc9
2 files changed
+25 -2

No files matched your search

+6
View File
@@ -2351,6 +2351,11 @@ int mg_strcmp(const struct mg_str str1, const struct mg_str str2);
*/
int mg_strncmp(const struct mg_str str1, const struct mg_str str2, size_t n);
/*
* Compare two `mg_str`s ignoreing case; return value is the same as `strcmp`.
*/
int mg_strcasecmp(const struct mg_str str1, const struct mg_str str2);
/*
* Free the string (assuming it was heap allocated).
*/
@@ -6239,6 +6244,7 @@ int mg_dns_encode_record(struct mbuf *io, struct mg_dns_resource_record *rr,
* Encodes a DNS name.
*/
int mg_dns_encode_name(struct mbuf *io, const char *name, size_t len);
int mg_dns_encode_name_s(struct mbuf *io, struct mg_str name);
/* Low-level: parses a DNS response. */
int mg_parse_dns(const char *buf, int len, struct mg_dns_message *msg);