Skip to content
Jurek Muszyński edited this page Dec 18, 2021 · 8 revisions

void npp_safe_copy(char *dst, const char *src, size_t dst_len)

void COPY(char *dst, const char *src, size_t dst_len)

Description

Copies up to dst_len bytes of NULL-terminated src to dst, respecting UTF-8 sequences. dst_len needs to be an actual destination string maximum length and dst buffer should provide an extra character for trailing '\0'. Function appends terminating '\0' to the end of dst.

Returns

None

Example

COPY(host, value, NPP_MAX_HOST_LEN);

Notes

Clone this wiki locally