OPENSSL_strcasecmp.pod 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. =pod
  2. =head1 NAME
  3. OPENSSL_strcasecmp, OPENSSL_strncasecmp - compare two strings ignoring case
  4. =head1 SYNOPSIS
  5. #include <openssl/crypto.h>
  6. int OPENSSL_strcasecmp(const char *s1, const char *s2);
  7. int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
  8. =head1 DESCRIPTION
  9. The OPENSSL_strcasecmp function performs a byte-by-byte comparison of the strings
  10. B<s1> and B<s2>, ignoring the case of the characters.
  11. The OPENSSL_strncasecmp function is similar, except that it compares no more than
  12. B<n> bytes of B<s1> and B<s2>.
  13. In POSIX-compatible system and on Windows these functions use "C" locale for
  14. case insensitive. Otherwise the comparison is done in current locale.
  15. =head1 RETURN VALUES
  16. Both functions return an integer less than, equal to, or greater than zero if
  17. s1 is found, respectively, to be less than, to match, or be greater than s2.
  18. =head1 NOTES
  19. OpenSSL extensively uses case insensitive comparison of ASCII strings. Though
  20. OpenSSL itself is locale-agnostic, the applications using OpenSSL libraries may
  21. unpredictably suffer when they use localization (e.g. Turkish locale is
  22. well-known with a specific I/i cases). These functions use C locale for string
  23. comparison.
  24. =head1 COPYRIGHT
  25. Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
  26. Licensed under the Apache License 2.0 (the "License"). You may not use
  27. this file except in compliance with the License. You can obtain a copy
  28. in the file LICENSE in the source distribution or at
  29. L<https://www.openssl.org/source/license.html>.
  30. =cut