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
8
9namespace 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
constexpr auto strcmp(char const *lhs, char const *rhs) -> int
Compares the C string lhs to the C string rhs.
Definition strcmp.hpp:18
Definition adjacent_find.hpp:8