ft_strcpy.c

This commit is contained in:
Timo Schmidt 2023-03-27 20:56:46 +02:00
parent 45f88f999a
commit dd0c58e2b2
1 changed files with 5 additions and 2 deletions

View File

@ -6,16 +6,19 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */ /* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 05:59:56 by tischmid #+# #+# */ /* Created: 2023/03/19 05:59:56 by tischmid #+# #+# */
/* Updated: 2023/03/26 00:53:19 by tischmid ### ########.fr */ /* Updated: 2023/03/27 20:56:31 by tischmid ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
char *ft_strcpy(char *s1, char *s2) char *ft_strcpy(char *s1, char *s2)
{ {
char *o_s1;
o_s1 = s1;
while (*s2) while (*s2)
*s1++ = *s2++; *s1++ = *s2++;
*s1 = 0; *s1 = 0;
return (s1); return (o_s1);
} }
/* //// /* ////