| 123456789101112131415161718192021222324252627282930 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_strncat.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2015/11/23 16:30:39 by bchanot #+# #+# */
- /* Updated: 2018/10/29 11:57:23 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- char *ft_strncat(char *s1, const char *const s2, size_t n)
- {
- size_t i;
- size_t j;
- i = ft_strlen(s1);
- j = 0;
- while (j < n && s2[j])
- {
- s1[i] = s2[j];
- i++;
- j++;
- }
- s1[i] = '\0';
- return (s1);
- }
|