tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
strncpy.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_CSTRING_STRNCPY_HPP
4#define TETL_CSTRING_STRNCPY_HPP
5
9
10namespace etl {
11
24constexpr auto strncpy(char* dest, char const* src, etl::size_t const count) -> char*
25{
26 TETL_PRECONDITION(dest != nullptr);
27 TETL_PRECONDITION(src != nullptr);
28 return etl::detail::strncpy(dest, src, count);
29}
30
31} // namespace etl
32
33#endif // TETL_CSTRING_STRNCPY_HPP
#define TETL_PRECONDITION(...)
Definition check.hpp:16
constexpr auto count(InputIt first, InputIt last, T const &value) -> typename iterator_traits< InputIt >::difference_type
Returns the number of elements in the range [first, last) satisfying specific criteria....
Definition count.hpp:21
constexpr auto strncpy(char *dest, char const *src, etl::size_t const count) -> char *
Copies at most count characters of the byte string pointed to by src (including the terminating null ...
Definition strncpy.hpp:24
Definition adjacent_find.hpp:8
TETL_BUILTIN_SIZET size_t
etl::size_t is the unsigned integer type of the result of the sizeof operator.
Definition size_t.hpp:14