| 123456789101112131415161718192021222324 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_strchr.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2015/11/25 13:32:36 by bchanot #+# #+# */
- /* Updated: 2018/10/11 22:27:45 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- char *ft_strchr(const char *s, int c)
- {
- if (!s)
- return (NULL);
- while (*s != (char)c && *s != '\0')
- s++;
- if (*s == (char)c)
- return ((char *)s);
- return (NULL);
- }
|