destination buffer, already containing one nul-terminated string
source buffer
length of dest buffer in bytes (not length of existing string inside dest)
size of attempted result, which is MIN (dest_size, strlen (original dest)) + strlen (src), so if retval >= dest_size, truncation occurred
Portability wrapper that calls
strlcat()on systems which have it, and emulates it otherwise. Appends nul-terminatedsrcstring todest, guaranteeing nul-termination fordest. The total size ofdestwon't exceeddest_size.At most
dest_size- 1 characters will be copied. Unlikestrncat(),dest_sizeis the full size of dest, not the space left over. This function does not allocate memory. It always nul-terminates (unlessdest_size== 0 or there were no nul characters in thedest_sizecharacters of dest to start with).Caveat: this is supposedly a more secure alternative to
strcat()orstrncat(), but for real security GLib.strconcat is harder to mess up.