curl_strequal.3 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.haxx.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .TH curl_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
  23. .SH NAME
  24. curl_strequal, curl_strnequal - case insensitive string comparisons
  25. .SH SYNOPSIS
  26. .B #include <curl/curl.h>
  27. .sp
  28. .BI "int curl_strequal(char *" str1 ", char *" str2 ");"
  29. .sp
  30. .BI "int curl_strnequal(char *" str1 ", char *" str2 ", size_t " len ");"
  31. .SH DESCRIPTION
  32. The
  33. .B curl_strequal()
  34. function compares the two strings \fIstr1\fP and \fIstr2\fP, ignoring the case
  35. of the characters. It returns a non-zero (TRUE) integer if the strings are
  36. identical.
  37. .sp
  38. The \fBcurl_strnequal()\fP function is similar, except it only compares the
  39. first \fIlen\fP characters of \fIstr1\fP.
  40. .sp
  41. These functions are provided by libcurl to enable applications to compare
  42. strings in a truly portable manner. There are no standard portable case
  43. insensitive string comparison functions. These two work on all platforms.
  44. .SH AVAILABILITY
  45. These functions will be removed from the public libcurl API in a near
  46. future. They will instead be made "available" by source code access only, and
  47. then as curlx_strequal() and curlx_strenqual().
  48. .SH RETURN VALUE
  49. Non-zero if the strings are identical. Zero if they're not.
  50. .SH "SEE ALSO"
  51. .BR strcmp "(3), " strcasecmp "(3)"