tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
wcscmp.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_CWCHAR_WCSCMP_HPP
5#define TETL_CWCHAR_WCSCMP_HPP
6
7#include <etl/_strings/cstr.hpp>
8
9namespace etl {
10/// \brief Compares two null-terminated wide strings lexicographically.
11///
12/// \details The sign of the result is the sign of the difference between the
13/// values of the first pair of wide characters that differ in the strings being
14/// compared.
15///
16/// The behavior is undefined if lhs or rhs are not pointers to null-terminated
17/// wide strings.
18[[nodiscard]] constexpr auto wcscmp(wchar_t const* lhs, wchar_t const* rhs) -> int
19{
20 return etl::detail::strcmp<wchar_t>(lhs, rhs);
21}
22} // namespace etl
23#endif // TETL_CWCHAR_WCSCMP_HPP
Definition adjacent_find.hpp:9
constexpr auto wcscmp(wchar_t const *lhs, wchar_t const *rhs) -> int
Compares two null-terminated wide strings lexicographically.
Definition wcscmp.hpp:18