3 ms·
My understanding is that strlcpy() exists to update existing programs that use NULL-terminated char arrays as strings. New programs should probably use some oth
by dmm 12y ago
My understanding is that strlcpy() exists to update existing programs that use NULL-terminated char arrays as strings. New programs should probably use some other more sophisticated implementation of strings, such as Git's strbuf:
https://github.com/git/git/blob/master/strbuf.c https://github.com/git/git/blob/master/strbuf.c
https://www.kernel.org/pub/software/scm/git/docs/technical/api-strbuf.html https://www.kernel.org/pub/software/scm/git/docs/technical/a...