aboutsummaryrefslogtreecommitdiff
path: root/ft_strcpy.c
diff options
context:
space:
mode:
Diffstat (limited to 'ft_strcpy.c')
-rw-r--r--ft_strcpy.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ft_strcpy.c b/ft_strcpy.c
new file mode 100644
index 0000000..8f3946d
--- /dev/null
+++ b/ft_strcpy.c
@@ -0,0 +1,13 @@
+char *ft_strcpy(char *dest, const char *src)
+{
+ int i;
+
+ i = 0;
+ while (src[i])
+ {
+ dest[i] = src[i];
+ i++;
+ }
+ dest[i] = '\0';
+ return (dest);
+}