tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
wcsncmp.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2020 Tobias Hienzsch
3
4
#
ifndef
TETL_CWCHAR_WCSNCMP_HPP
5
#
define
TETL_CWCHAR_WCSNCMP_HPP
6
7
#
include
<
etl
/
_cstddef
/
size_t
.
hpp
>
8
#
include
<
etl
/
_strings
/
cstr
.
hpp
>
9
10
namespace
etl
{
11
12
/// \brief Compares at most count wide characters of two null-terminated wide
13
/// strings. The comparison is done lexicographically.
14
///
15
/// \details The sign of the result is the sign of the difference between the
16
/// values of the first pair of wide characters that differ in the strings being
17
/// compared.
18
///
19
/// The behavior is undefined if lhs or rhs are not pointers to null-terminated
20
/// strings.
21
[[
nodiscard
]]
constexpr
auto
wcsncmp
(
wchar_t
const
* lhs,
wchar_t
const
* rhs,
etl
::size_t count) ->
int
22
{
23
return
etl
::detail::strncmp<
wchar_t
,
etl
::size_t>(lhs, rhs, count);
24
}
25
26
}
// namespace etl
27
#
endif
// TETL_CWCHAR_WCSNCMP_HPP
etl
Definition
adjacent_find.hpp:9
etl::wcsncmp
constexpr auto wcsncmp(wchar_t const *lhs, wchar_t const *rhs, etl::size_t count) -> int
Compares at most count wide characters of two null-terminated wide strings. The comparison is done le...
Definition
wcsncmp.hpp:21
include
etl
_cwchar
wcsncmp.hpp
Generated on Sun Sep 7 2025 19:14:54 for tetl by
1.9.8