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