/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strrnchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rbousset +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ /* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ /* */ /* ************************************************************************** */ #include char *ft_strrnchr(const char *s, int c, size_t start) { size_t i; i = ft_strlen(s) - start; while (s[i] != c) { if (i == 0) return (NULL); i--; } return ((char*)&s[i]); }