tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
strcspn.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_CSTRING_STRCSPN_HPP
5
#
define
TETL_CSTRING_STRCSPN_HPP
6
7
#
include
<
etl
/
_cstddef
/
size_t
.
hpp
>
8
#
include
<
etl
/
_strings
/
cstr
.
hpp
>
9
10
namespace
etl
{
11
12
/// Returns the length of the maximum initial segment of the byte string
13
/// pointed to by dest, that consists of only the characters not found in byte
14
/// string pointed to by src.
15
///
16
/// The function name stands for "complementary span"
17
///
18
/// https://en.cppreference.com/w/cpp/string/byte/strcspn
19
///
20
/// \ingroup cstring
21
[[
nodiscard
]]
constexpr
auto
strcspn
(
char
const
* dest,
char
const
* src)
noexcept
->
etl
::size_t
22
{
23
return
etl
::detail::strspn<
char
,
etl
::size_t,
false
>(dest, src);
24
}
25
26
}
// namespace etl
27
28
#
endif
// TETL_CSTRING_STRCSPN_HPP
etl::strcspn
constexpr auto strcspn(char const *dest, char const *src) noexcept -> etl::size_t
Returns the length of the maximum initial segment of the byte string pointed to by dest,...
Definition
strcspn.hpp:21
etl
Definition
adjacent_find.hpp:9
include
etl
_cstring
strcspn.hpp
Generated on Sun Sep 7 2025 19:14:54 for tetl by
1.9.8