/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strncpy.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gtertysh +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/10/31 16:59:01 by gtertysh #+# #+# */ /* Updated: 2016/11/01 20:11:02 by gtertysh ### ########.fr */ /* */ /* ************************************************************************** */ char *ft_strncpy(char *dest, char *src, unsigned int n) { char *start; unsigned int i; start = dest; i = 0; while (i < n && *src) { *dest = *src; dest++; src++; i++; } *dest = '\0'; return (start); }