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.
| 309 | // is always zero terminated. 'maxlen' parameter defines the entire |
| 310 | // dest buffer size and is not compatible with wcsncat. |
| 311 | void 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 |
nothing calls this directly
no test coverage detected