tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
wcsstr.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_WCSSTR_HPP
5#define TETL_CWCHAR_WCSSTR_HPP
6
7#include <etl/_strings/cstr.hpp>
8
9namespace etl {
10
11/// \brief Finds the first occurrence of the wide string needle in the wide
12/// string pointed to by haystack. The terminating null characters are not
13/// compared.
14///
15/// https://en.cppreference.com/w/cpp/string/wide/wcspbrk
16[[nodiscard]] constexpr auto wcsstr(wchar_t* haystack, wchar_t* needle) noexcept -> wchar_t*
17{
18 return etl::detail::strstr_impl<wchar_t>(haystack, needle);
19}
20
21/// \brief Finds the first occurrence of the wide string needle in the wide
22/// string pointed to by haystack. The terminating null characters are not
23/// compared.
24///
25/// https://en.cppreference.com/w/cpp/string/wide/wcspbrk
26[[nodiscard]] constexpr auto wcsstr(wchar_t const* haystack, wchar_t const* needle) noexcept -> wchar_t const*
27{
28 return etl::detail::strstr_impl<wchar_t const>(haystack, needle);
29}
30} // namespace etl
31#endif // TETL_CWCHAR_WCSSTR_HPP
Definition adjacent_find.hpp:9
constexpr auto wcsstr(wchar_t *haystack, wchar_t *needle) noexcept -> wchar_t *
Finds the first occurrence of the wide string needle in the wide string pointed to by haystack....
Definition wcsstr.hpp:16
constexpr auto wcsstr(wchar_t const *haystack, wchar_t const *needle) noexcept -> wchar_t const *
Finds the first occurrence of the wide string needle in the wide string pointed to by haystack....
Definition wcsstr.hpp:26