-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strccpy.c
27 lines (24 loc) · 1.08 KB
/
ft_strccpy.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strccpy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: magoumi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/10/25 21:04:53 by magoumi #+# #+# */
/* Updated: 2018/10/25 21:33:18 by magoumi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strccpy(char *dst, const char *src, char c)
{
size_t len;
len = 0;
while (src[len] != '\0' && src[len] != c)
{
dst[len] = src[len];
len++;
}
dst[len] = '\0';
return (dst);
}