tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
rfind.hpp
Go to the documentation of this file.
1
2
// SPDX-License-Identifier: BSL-1.0
3
4
#ifndef TETL_STRING_STRINGS_RFIND_HPP
5
#define TETL_STRING_STRINGS_RFIND_HPP
6
7
#include <
etl/_string_view/basic_string_view.hpp
>
8
9
namespace
etl::strings
{
10
11
template
<
typename
CharT,
typename
Traits>
12
[[nodiscard]]
constexpr
auto
rfind
(
13
basic_string_view<CharT, Traits>
haystack,
14
CharT character,
15
typename
basic_string_view<CharT, Traits>::size_type
pos
16
)
noexcept
->
typename
basic_string_view<CharT, Traits>::size_type
17
{
18
return
haystack.rfind(character, pos);
19
}
20
21
template
<
typename
CharT,
typename
Traits>
22
[[nodiscard]]
constexpr
auto
rfind
(
23
basic_string_view<CharT, Traits>
haystack,
24
basic_string_view<CharT, Traits>
needle,
25
typename
basic_string_view<CharT, Traits>::size_type
pos
26
)
noexcept
->
typename
basic_string_view<CharT, Traits>::size_type
27
{
28
return
haystack.rfind(needle, pos);
29
}
30
31
}
// namespace etl::strings
32
33
#endif
// TETL_STRING_STRINGS_RFIND_HPP
basic_string_view.hpp
etl::strings
Definition
find.hpp:8
etl::strings::rfind
constexpr auto rfind(basic_string_view< CharT, Traits > haystack, CharT character, typename basic_string_view< CharT, Traits >::size_type pos) noexcept -> typename basic_string_view< CharT, Traits >::size_type
Definition
rfind.hpp:12
etl::basic_string_view
The class template basic_string_view describes an object that can refer to a constant contiguous sequ...
Definition
basic_string_view.hpp:34
etl::basic_string_view::size_type
etl::size_t size_type
Definition
basic_string_view.hpp:43
include
etl
_strings
rfind.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0