/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strrchr_n.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: scebula +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/02/16 20:34:24 by scebula #+# #+# */ /* Updated: 2016/02/20 17:04:47 by scebula ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int ft_strrchr_n(char *str, char c) { int i; i = 0; while (str[i]) { if (str[i] == c) return (i + 1); i++; } return (0); }