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