diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-10-31 09:45:17 +0100 |
---|---|---|
committer | ng0 <ng0@infotropique.org> | 2017-08-22 15:10:23 +0000 |
commit | 72e52fd4182158e7797a5a5ad2f5ca7c048fdfbb (patch) | |
tree | a63fd30b2f393ebb08f325b67b653ecceeb91942 /lib/strcase.c | |
parent | 09917b780b062740c685715ddab99481d9f45ee8 (diff) | |
download | gnurl-72e52fd4182158e7797a5a5ad2f5ca7c048fdfbb.tar.gz gnurl-72e52fd4182158e7797a5a5ad2f5ca7c048fdfbb.tar.bz2 gnurl-72e52fd4182158e7797a5a5ad2f5ca7c048fdfbb.zip |
curl_strequal: part of public API/ABI, needs to be kept
These two public functions have been mentioned as deprecated since a
very long time but since they are still part of the API and ABI we need
to keep them around.
Diffstat (limited to 'lib/strcase.c')
-rw-r--r-- | lib/strcase.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/strcase.c b/lib/strcase.c index 22b9692e2..5f2b700e0 100644 --- a/lib/strcase.c +++ b/lib/strcase.c @@ -102,7 +102,7 @@ char Curl_raw_toupper(char in) * @unittest: 1301 */ -int curl_strcasecompare(const char *first, const char *second) +int Curl_strcasecompare(const char *first, const char *second) { while(*first && *second) { if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) @@ -120,7 +120,7 @@ int curl_strcasecompare(const char *first, const char *second) /* * @unittest: 1301 */ -int curl_strncasecompare(const char *first, const char *second, size_t max) +int Curl_strncasecompare(const char *first, const char *second, size_t max) { while(*first && *second && max) { if(Curl_raw_toupper(*first) != Curl_raw_toupper(*second)) { @@ -150,3 +150,14 @@ void Curl_strntoupper(char *dest, const char *src, size_t n) *dest++ = Curl_raw_toupper(*src); } while(*src++ && --n); } + +/* --- public functions --- */ + +int curl_strequal(const char *first, const char *second) +{ + return Curl_strcasecompare(first, second); +} +int curl_strnequal(const char *first, const char *second, size_t max) +{ + return Curl_strncasecompare(first, second, max); +} |