aboutsummaryrefslogtreecommitdiff
path: root/lib/strcase.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-10-31 09:45:17 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 09:45:17 +0100
commit8fe4bd084412f3085638907268c5ffd8bf93c339 (patch)
tree76559169a181041505bb214e556e8e72028c5118 /lib/strcase.c
parent44c53cc38bea66b7612a82fa4c9b68884b9167fa (diff)
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.c15
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);
+}