ajout explication strlcpy
This commit is contained in:
@@ -14,6 +14,10 @@
|
|||||||
** copy size - 1 length of src into dest,
|
** copy size - 1 length of src into dest,
|
||||||
** terminate it with a '\0'
|
** terminate it with a '\0'
|
||||||
** and return size of src
|
** and return size of src
|
||||||
|
** this way, if you try to copy a name in a variable with an available size
|
||||||
|
** of 5 for exemple, if you use ft_strlcpy(variable, name, sizeof(variable))
|
||||||
|
** you will know if the name was too long for the variable by looking at the
|
||||||
|
** return value (which is size of name)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user