Vitamin4eg

Untitled

Oct 22nd, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. unsigned int ft_strlcpy(char *dest, char *src, unsigned int size)
  2. {
  3. unsigned int count;
  4. unsigned int i;
  5.  
  6. count = 0;
  7. while (src[count] != '\0')
  8. ++count;
  9. i = 0;
  10. while (src[i] != '\0' && i < (size - 1))
  11. {
  12. dest[i] = src[i];
  13. ++i;
  14. }
  15. dest[i] = '\0';
  16. return (count);
  17. }
Add Comment
Please, Sign In to add comment