MINOR: chunk: implement chunk_strncpy() to copy partial strings
authorWilly Tarreau <w@1wt.eu>
Fri, 14 Feb 2020 10:31:41 +0000 (11:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Feb 2020 18:02:06 +0000 (19:02 +0100)
commitd4ad66905188ade3fcf53c84c43abc64154b3f70
tree6475e988d22aa43ed417d53b8f675a79c969b27e
parent36f586b6944fc40c1e2ecdae85e2df552d3d1fee
MINOR: chunk: implement chunk_strncpy() to copy partial strings

This does like chunk_strcpy() except that the maximum string length may
be limited by the caller. A trailing zero is always appended. This is
particularly handy to extract portions of strings to put into the trash
for use with libc functions requiring a nul-terminated string.
include/common/chunk.h