| 1234567891011121314151617181920212223 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_strndup.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@student.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2017/12/19 19:32:15 by bchanot #+# #+# */
- /* Updated: 2018/10/13 22:48:31 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- char *ft_strndup(const char *src, int n)
- {
- char *new;
- if (!(new = ft_strnew(n)))
- return (NULL);
- ft_memcpy(new, src, n);
- return (new);
- }
|