/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strrchr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rzy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/08/23 23:16:26 by rzy #+# #+# */ /* Updated: 2026/08/23 23:17:56 by rzy ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" char *ft_strrchr(const char *s, int c) { int i; char *occ; i = 0; occ = NULL; while (s[i]) { if (s[i] == (char)c) occ = (char *)&s[i]; ++i; } if (s[i] == (char)c) occ = (char *)&s[i]; return (occ); }