tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
strpbrk.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_CSTRING_STRPBRK_HPP
5#define TETL_CSTRING_STRPBRK_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8#include <etl/_strings/cstr.hpp>
9
10namespace etl {
11
12/// \ingroup cstring
13/// @{
14
15/// Scans the null-terminated byte string pointed to by dest for any
16/// character from the null-terminated byte string pointed to by breakset, and
17/// returns a pointer to that character.
18///
19/// https://en.cppreference.com/w/cpp/string/byte/strpbrk
20///
21/// \ingroup cstring
22[[nodiscard]] constexpr auto strpbrk(char const* dest, char const* breakset) noexcept -> char const*
23{
24 return etl::detail::strpbrk_impl<char const, etl::size_t>(dest, breakset);
25}
26
27[[nodiscard]] constexpr auto strpbrk(char* dest, char* breakset) noexcept -> char*
28{
29 return etl::detail::strpbrk_impl<char, etl::size_t>(dest, breakset);
30}
31
32/// @}
33
34} // namespace etl
35
36#endif // TETL_CSTRING_STRPBRK_HPP
constexpr auto strpbrk(char *dest, char *breakset) noexcept -> char *
Definition strpbrk.hpp:27
constexpr auto strpbrk(char const *dest, char const *breakset) noexcept -> char const *
Definition strpbrk.hpp:22
Definition adjacent_find.hpp:9