pmstrncat - Man Page
safe string concatenation
C Synopsis
#include <pcp/pmapi.h>
int pmstrncat(char *dest, size_t destlen, char *src);
cc ... -lpcp
Description
pmstrncat is safe string concatenation routine with semantics similar to strncat(3).
The main differences are that src must be null-byte terminated, destlen is the length of the destination buffer (dest) not the length of the source string (src), and pmstrncat ensures that dest is null-byte terminated, even when strlen(src) is larger than the remaining space in dest (destlen - strlen(dest) on entry).
On success, pmstrncat returns 0, else -1 indicates that src is too big and the result been truncated to ensure dest has no been overrun.
See Also
pmstrncpy(3) and strncat(3).
Referenced By
PCP Performance Co-Pilot