-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strchrs.c
executable file
·31 lines (28 loc) · 1.13 KB
/
ft_strchrs.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_strchrs.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: akharrou <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/21 16:47:58 by akharrou #+# #+# */
/* Updated: 2019/04/15 07:51:58 by akharrou ### ########.fr */
/* */
/* ************************************************************************** */
#include "../Includes/string_42.h"
char *ft_strchrs(const char *str, const char *charset)
{
int i;
if (str && charset)
{
while (*str)
{
i = 0;
while (charset[i])
if (*str == charset[i++])
return ((char *)str);
++str;
}
}
return (NULL);
}