xref: /aosp_15_r20/external/abseil-cpp/absl/strings/internal/memutil.h (revision 9356374a3709195abf420251b3e825997ff56c0f)
1*9356374aSAndroid Build Coastguard Worker //
2*9356374aSAndroid Build Coastguard Worker // Copyright 2017 The Abseil Authors.
3*9356374aSAndroid Build Coastguard Worker //
4*9356374aSAndroid Build Coastguard Worker // Licensed under the Apache License, Version 2.0 (the "License");
5*9356374aSAndroid Build Coastguard Worker // you may not use this file except in compliance with the License.
6*9356374aSAndroid Build Coastguard Worker // You may obtain a copy of the License at
7*9356374aSAndroid Build Coastguard Worker //
8*9356374aSAndroid Build Coastguard Worker //      https://www.apache.org/licenses/LICENSE-2.0
9*9356374aSAndroid Build Coastguard Worker //
10*9356374aSAndroid Build Coastguard Worker // Unless required by applicable law or agreed to in writing, software
11*9356374aSAndroid Build Coastguard Worker // distributed under the License is distributed on an "AS IS" BASIS,
12*9356374aSAndroid Build Coastguard Worker // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*9356374aSAndroid Build Coastguard Worker // See the License for the specific language governing permissions and
14*9356374aSAndroid Build Coastguard Worker // limitations under the License.
15*9356374aSAndroid Build Coastguard Worker //
16*9356374aSAndroid Build Coastguard Worker 
17*9356374aSAndroid Build Coastguard Worker #ifndef ABSL_STRINGS_INTERNAL_MEMUTIL_H_
18*9356374aSAndroid Build Coastguard Worker #define ABSL_STRINGS_INTERNAL_MEMUTIL_H_
19*9356374aSAndroid Build Coastguard Worker 
20*9356374aSAndroid Build Coastguard Worker #include <cstddef>
21*9356374aSAndroid Build Coastguard Worker #include <cstring>
22*9356374aSAndroid Build Coastguard Worker 
23*9356374aSAndroid Build Coastguard Worker #include "absl/base/port.h"  // disable some warnings on Windows
24*9356374aSAndroid Build Coastguard Worker #include "absl/strings/ascii.h"  // for absl::ascii_tolower
25*9356374aSAndroid Build Coastguard Worker 
26*9356374aSAndroid Build Coastguard Worker namespace absl {
27*9356374aSAndroid Build Coastguard Worker ABSL_NAMESPACE_BEGIN
28*9356374aSAndroid Build Coastguard Worker namespace strings_internal {
29*9356374aSAndroid Build Coastguard Worker 
30*9356374aSAndroid Build Coastguard Worker // Performs a byte-by-byte comparison of `len` bytes of the strings `s1` and
31*9356374aSAndroid Build Coastguard Worker // `s2`, ignoring the case of the characters. It returns an integer less than,
32*9356374aSAndroid Build Coastguard Worker // equal to, or greater than zero if `s1` is found, respectively, to be less
33*9356374aSAndroid Build Coastguard Worker // than, to match, or be greater than `s2`.
34*9356374aSAndroid Build Coastguard Worker int memcasecmp(const char* s1, const char* s2, size_t len);
35*9356374aSAndroid Build Coastguard Worker 
36*9356374aSAndroid Build Coastguard Worker }  // namespace strings_internal
37*9356374aSAndroid Build Coastguard Worker ABSL_NAMESPACE_END
38*9356374aSAndroid Build Coastguard Worker }  // namespace absl
39*9356374aSAndroid Build Coastguard Worker 
40*9356374aSAndroid Build Coastguard Worker #endif  // ABSL_STRINGS_INTERNAL_MEMUTIL_H_
41