push
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strcpy.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: sgongas <sgongas@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/02/22 23:31:17 by sgongas #+# #+# */
|
||||
/* Updated: 2026/02/22 23:38:22 by sgongas ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
char *ft_strcpy(char *dest, char *src)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (src[i])
|
||||
{
|
||||
dest[i] = src[i];
|
||||
i++;
|
||||
}
|
||||
dest[i] = '\0';
|
||||
return (dest);
|
||||
}
|
||||
|
||||
// #include <stdio.h>
|
||||
|
||||
// int main(void)
|
||||
// {
|
||||
// char src[] = "hello";
|
||||
// char dest[10];
|
||||
|
||||
// ft_strcpy(dest, src);
|
||||
// printf("%s", dest);
|
||||
// return (0);
|
||||
// }
|
||||
Reference in New Issue
Block a user