string.h, this function copies
takes the full size of the buffer, not only the length, and terminates
the result with
NUL as long as
greater than 0. Include a byte for the
strlcpy() function returns the total
length of the string that would have been copied
if there was unlimited space. This might or might not be equal to
the length of the string actually copied, depending
on whether there was enough space. This means that you can call
to find out how much space is required, then allocate it if you
do not have enough, and finally call
second time to do the required copy.
This function is a common BSD-derived extension to many C libraries.