tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
wcscpy.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_WCSCPY_HPP
5#define TETL_CWCHAR_WCSCPY_HPP
6
7#include <etl/_contracts/check.hpp>
8#include <etl/_cstddef/size_t.hpp>
9#include <etl/_strings/cstr.hpp>
10
11namespace etl {
12
13/// \brief Copies the wide string pointed to by src (including the terminating
14/// null wide character) to wide character array pointed to by dest.
15///
16/// \details The behavior is undefined if the dest array is not large enough.
17/// The behavior is undefined if the strings overlap.
18///
19/// \returns dest
20constexpr auto wcscpy(wchar_t* dest, wchar_t const* src) -> wchar_t*
21{
22 TETL_PRECONDITION(dest != nullptr);
23 TETL_PRECONDITION(src != nullptr);
24 return etl::detail::strcpy(dest, src);
25}
26
27} // namespace etl
28#endif // TETL_CWCHAR_WCSCPY_HPP
Definition adjacent_find.hpp:9
constexpr auto wcscpy(wchar_t *dest, wchar_t const *src) -> wchar_t *
Copies the wide string pointed to by src (including the terminating null wide character) to wide char...
Definition wcscpy.hpp:20