MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / strncatz

Function strncatz

Libraries/unrar/strfn.cpp:311–316  ·  view source on GitHub ↗

Safe append: resulting dest length cannot exceed maxlen and dest is always zero terminated. 'maxlen' parameter defines the entire dest buffer size and is not compatible with wcsncat.

Source from the content-addressed store, hash-verified

309// is always zero terminated. 'maxlen' parameter defines the entire
310// dest buffer size and is not compatible with wcsncat.
311void strncatz(char* dest, const char* src, size_t maxlen)
312{
313 size_t length = strlen(dest);
314 if (maxlen > length)
315 strncpyz(dest + length, src, maxlen - length);
316}
317
318
319// Safe append: resulting dest length cannot exceed maxlen and dest

Callers

nothing calls this directly

Calls 1

strncpyzFunction · 0.85

Tested by

no test coverage detected