/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_substr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: cchauvet len) size = len; ptr = malloc((size + 1) * sizeof(char)); if (ptr == NULL) return (NULL); ptr[size] = '\0'; while (size-- > 0) ptr[size] = s[start + size]; return (ptr); }