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