On Wed, 19 Apr 2006 15:45:03 +0000 (UTC) "Henrik Grubbstr_m (Lysator) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se wrote:
strlcpy is faster than strncpy, so we would like to use it when it exsits. Perhaps use a definition in port.h?
"faster"? Do you mean "easier to use"?
Both. If you have a big buffer, and strncpy only a few chars into, it wastes time filling the entire buffer with nulls. So strlcpy should be faster since it only copies the few chars and a single null.
Adam