strlcat

fun strlcat(dest: String, src: String, destSize: <Error class: unknown class>): <Error class: unknown class>

Portability wrapper that calls strlcat() on systems which have it, and emulates it otherwise. Appends nul-terminated @src string to @dest, guaranteeing nul-termination for @dest. The total size of @dest won't exceed @dest_size.

At most @dest_size - 1 characters will be copied. Unlike strncat(),

Return

size of attempted result, which is MIN (dest_size, strlen (original dest)) + strlen (src), so if @retval >= @dest_size, truncation occurred

Parameters

dest

destination buffer, already containing one nul-terminated string

src

source buffer

destSize

length of @dest buffer in bytes (not length of existing string inside @dest)