-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathkagawa.c
42 lines (37 loc) · 1.25 KB
/
kagawa.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* kagawa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: snara <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/29 15:40:38 by snara #+# #+# */
/* Updated: 2021/12/29 18:02:31 by snara ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
char *ft_strchr(char const *s, int c)
{
while (*s && *s != (char)c)
++s;
if (*s == (char)c)
return ((char *)s);
return (NULL);
}
ssize_t ft_put_udon(char *s)
{
ssize_t i = 0;
while (s[i])
{
if (ft_strchr("udonUDON", s[i]))
write(1, "\n", 1);
write(1, &s[i], 1);
++i;
}
return i;
}
int main()
{
ft_put_udon("udon oishii\n");
return (0);
}