-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_str5.c
44 lines (36 loc) · 1.29 KB
/
ft_str5.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
32
33
34
35
36
37
38
39
40
41
42
43
44
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str5.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lgillot- <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/19 01:54:10 by lgillot- #+# #+# */
/* Updated: 2015/11/19 01:56:15 by lgillot- ### ########.fr */
/* */
/* ************************************************************************** */
#include <string.h>
#include <ft_mem.h>
#include <ft_str.h>
void ft_strdel(char **as)
{
ft_memdel((void **)as);
}
void ft_strclr(char *s)
{
while (*s)
*s++ = '\0';
}
int ft_strequ(char const *s1, char const *s2)
{
return (ft_strcmp(s1, s2) == 0);
}
int ft_strnequ(char const *s1, char const *s2, size_t n)
{
return (ft_strncmp(s1, s2, n) == 0);
}
void ft_striter(char *s, void (*f)(char *))
{
while (*s)
f(s++);
}