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