rtv1/libft/ft_strcat.c

33 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/25 16:26:53 by gbrochar #+# #+# */
/* Updated: 2016/04/09 21:24:58 by gbrochar ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strcat(char *s1, const char *s2)
{
char *p_s1;
const char *p_s2;
p_s2 = s2;
p_s1 = s1;
while (*p_s1)
p_s1++;
while (*p_s2)
{
*p_s1 = *p_s2;
p_s1++;
p_s2++;
}
*p_s1 = '\0';
return (s1);
}