-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strcpy_until.c
executable file
·31 lines (28 loc) · 1.16 KB
/
ft_strcpy_until.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
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcpy_until.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akharrou <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/02 10:48:34 by akharrou #+# #+# */
/* Updated: 2019/03/04 13:17:20 by akharrou ### ########.fr */
/* */
/* ************************************************************************** */
#include "../Includes/libft.h"
char *ft_strcpy_until(char *dest, const char *src, char *charset)
{
int i;
if (dest && src && charset)
{
i = 0;
while (src[i] && !ft_ischarset(src[i], charset))
{
dest[i] = src[i];
++i;
}
dest[i] = src[i];
return (dest);
}
return (NULL);
}