tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
strcmp.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_CSTRING_STRCMP_HPP
4
#define TETL_CSTRING_STRCMP_HPP
5
6
#include <
etl/_cstddef/size_t.hpp
>
7
#include <
etl/_strings/cstr.hpp
>
8
9
namespace
etl
{
10
18
[[nodiscard]]
constexpr
auto
strcmp
(
char
const
* lhs,
char
const
* rhs) ->
int
19
{
20
#if defined(__clang__)
21
return
__builtin_strcmp(lhs, rhs);
22
#else
23
return
etl::detail::strcmp<char>(lhs, rhs);
24
#endif
25
}
26
27
}
// namespace etl
28
29
#endif
// TETL_CSTRING_STRCMP_HPP
cstr.hpp
etl::strcmp
constexpr auto strcmp(char const *lhs, char const *rhs) -> int
Compares the C string lhs to the C string rhs.
Definition
strcmp.hpp:18
etl
Definition
adjacent_find.hpp:8
size_t.hpp
include
etl
_cstring
strcmp.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0