| 12345678910111213141516171819202122232425 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* ft_strchr.c :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2015/11/25 13:32:36 by bchanot #+# #+# */
- /* Updated: 2016/03/16 16:58:20 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "libft.h"
- char *ft_strchr(const char *s, int c)
- {
- char *str;
- str = (char*)s;
- while (*str != (char)c && *str != '\0')
- str++;
- if (*str == (char)c)
- return (str);
- return (NULL);
- }
|