.\" generated by cd2nroff 0.1 from curl_strnequal.md .TH curl_strnequal 3 "2024-11-18" libcurl .SH NAME curl_strnequal \- compare two strings ignoring case .SH SYNOPSIS .nf #include int curl_strnequal(const char *str1, const char *str2, size_t length); .fi .SH DESCRIPTION The \fIcurl_strnequal(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. This function compares no more than the first \fIlength\fP bytes of \fIstr1\fP and \fIstr2\fP. 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. 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. .SH PROTOCOLS This functionality affects all supported protocols .SH EXAMPLE .nf int main(int argc, char **argv) { const char *name = "compare"; if(curl_strnequal(name, argv[1], 5)) printf("Name and input matches in the 5 first bytes\\n"); } .fi .SH AVAILABILITY Added in curl 7.1 .SH RETURN VALUE Non\-zero if the strings are identical. Zero if they are not. .SH SEE ALSO .BR curl_strequal (3), .BR strcasecmp (3), .BR strcmp (3)