logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pmstrncat - safe string concatenation

C Synopsis

#include<pcp/pmapi.h>intpmstrncat(char*dest,size_tdestlen,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.

Name

pmstrncat - safe string concatenation

See Also

pmstrncpy(3) and strncat(3).

Performance Co-Pilot                                   PCP                                          PMSTRNCAT(3)

See Also