blob: f055dd6c99f8da4e87b38b2e50df2c1ea5a5bfbe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright 2022 Alejandro Colomar <alx@kernel.org>
// SPDX-License-Identifier: LGPL-3.0-or-later WITH LGPL-3.0-linking-exception
#ifndef INCLUDE_C_STR_CPY_STP_STP_ZUSTR2STP_H_
#define INCLUDE_C_STR_CPY_STP_STP_ZUSTR2STP_H_
#include <stddef.h>
#include <c/str/cpy/stp/_compiler.h> // IWYU pragma: keep
#include <c/str/cpy/stp/ustp/zustr2ustp.h>
#pragma clang assume_nonnull begin
inline char *c_zustr2stp(char *restrict dst, const char *restrict src,
size_t sz);
inline char *
c_zustr2stp(char *restrict dst, const char *restrict src, size_t sz)
{
char *p;
p = c_zustr2ustp(dst, src, sz);
*p = '\0';
return p;
}
#pragma clang assume_nonnull end
#endif // Header guard
|