minishell
ft_strchr.c
Go to the documentation of this file.
1 /* ************************************************************************** */
2 /* */
3 /* ::: :::::::: */
4 /* ft_strchr.c :+: :+: :+: */
5 /* +:+ +:+ +:+ */
6 /* By: kfujita <kfujita@student.42tokyo.jp> +#+ +:+ +#+ */
7 /* +#+#+#+#+#+ +#+ */
8 /* Created: 2022/04/10 14:52:38 by kfujita #+# #+# */
9 /* Updated: 2022/04/11 23:55:10 by kfujita ### ########.fr */
10 /* */
11 /* ************************************************************************** */
12 
13 #include <stddef.h>
14 
15 char *ft_strchr(const char *s, int c)
16 {
17  while (*s != (char)c && *s != '\0')
18  s++;
19  if (*s == (char)c)
20  return ((char *)s);
21  else
22  return (NULL);
23 }
char * ft_strchr(const char *s, int c)
Definition: ft_strchr.c:15