tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
wcschr.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_WCSCHR_HPP
5#define TETL_CWCHAR_WCSCHR_HPP
6
7#include <etl/_strings/cstr.hpp>
8
9namespace etl {
10/// \brief Finds the first occurrence of the wide character ch in the wide
11/// string pointed to by str.
12///
13/// https://en.cppreference.com/w/cpp/string/wide/wcschr
14[[nodiscard]] constexpr auto wcschr(wchar_t* str, int ch) -> wchar_t*
15{
16 return etl::detail::strchr<wchar_t>(str, ch);
17}
18
19/// \brief Finds the first occurrence of the wide character ch in the wide
20/// string pointed to by str.
21///
22/// https://en.cppreference.com/w/cpp/string/wide/wcschr
23[[nodiscard]] constexpr auto wcschr(wchar_t const* str, int ch) -> wchar_t const*
24{
25 return etl::detail::strchr<wchar_t const>(str, ch);
26}
27} // namespace etl
28#endif // TETL_CWCHAR_WCSCHR_HPP
Definition adjacent_find.hpp:9
constexpr auto wcschr(wchar_t *str, int ch) -> wchar_t *
Finds the first occurrence of the wide character ch in the wide string pointed to by str.
Definition wcschr.hpp:14
constexpr auto wcschr(wchar_t const *str, int ch) -> wchar_t const *
Finds the first occurrence of the wide character ch in the wide string pointed to by str.
Definition wcschr.hpp:23