1curl_strequal(3)                libcurl Manual                curl_strequal(3)
2
3
4

NAME

6       curl_strequal, curl_strnequal - case insensitive string comparisons
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       int curl_strequal(char *str1, char *str2);
12       int curl_strnequal(char *str1, char *str2, size_t length);
13

DESCRIPTION

15       The  curl_strequal()  function  compares the two strings str1 and str2,
16       ignoring the case of the characters. It returns a non-zero (TRUE) inte‐
17       ger if the strings are identical.
18
19       The  curl_strnequal()  function is similar, except it only compares the
20       first lenght characters of str1.
21
22       These functions are provided by libcurl to enable applications to  com‐
23       pare strings in a truly portable manner. There are no standard portable
24       case insensitive string comparison functions. These  two  work  on  all
25       platforms.
26

EXAMPLE

28       if(curl_strequal(name, input))
29         printf("Name and input matches\n");
30       if(curl_strnequal(name, input, 5))
31         printf("Name and input matches in the 5 first bytes\n");
32

AVAILABILITY

34       These  functions  will be removed from the public libcurl API in a near
35       future. They will instead be made "available"  by  source  code  access
36       only, and then as curlx_strequal() and curlx_strenqual().
37

RETURN VALUE

39       Non-zero if the strings are identical. Zero if they are not.
40

SEE ALSO

42       strcmp(3), strcasecmp(3)
43
44
45
46libcurl 7.85.0                   May 17, 2022                 curl_strequal(3)
Impressum