2
0
mirror of https://codeberg.org/kiss-community/repo synced 2025-01-06 18:00:10 -07:00
repo/core/curl/files/curl_strequal.3

42 lines
1.3 KiB
Groff
Raw Normal View History

.\" generated by cd2nroff 0.1 from curl_strequal.md
2024-11-09 21:03:25 -07:00
.TH curl_strequal 3 "2024-11-09" libcurl
.SH NAME
2024-07-29 18:00:04 -06:00
curl_strequal \- compare two strings ignoring case
.SH SYNOPSIS
.nf
#include <curl/curl.h>
int curl_strequal(const char *str1, const char *str2);
.fi
.SH DESCRIPTION
2024-07-29 18:00:04 -06:00
The \fIcurl_strequal(3)\fP function compares the two strings \fIstr1\fP and \fIstr2\fP,
ignoring the case of the characters. It returns a non\-zero (TRUE) integer if
the strings are identical.
2024-07-29 18:00:04 -06:00
This function uses plain ASCII based comparisons completely disregarding the
locale \- contrary to how \fBstrcasecmp\fP and other system case insensitive
string comparisons usually work.
2024-07-29 18:00:04 -06:00
This function is provided by libcurl to enable applications to compare strings
in a truly portable manner. There are no standard portable case insensitive
string comparison functions. This function works on all platforms.
2024-03-30 12:28:04 -06:00
.SH PROTOCOLS
2024-07-29 18:00:04 -06:00
This functionality affects all supported protocols
.SH EXAMPLE
.nf
int main(int argc, char **argv)
{
const char *name = "compare";
if(curl_strequal(name, argv[1]))
printf("Name and input matches\\n");
}
.fi
.SH AVAILABILITY
2024-07-29 18:00:04 -06:00
Added in curl 7.1
.SH RETURN VALUE
Non\-zero if the strings are identical. Zero if they are not.
.SH SEE ALSO
2024-07-29 18:00:04 -06:00
.BR curl_strnequal (3),
.BR strcasecmp (3),
.BR strcmp (3)