printf/libft/ft_strrchr.c
/* searches fo rht elast occurance of a char
* within the str. */
searches fo rht elast occurance of a char
within the str.
searches fo rht elast occurance of a char within the str .
char	*ft_strrchr(const char *s, int c)
{
	int	i;
	i = ft_strlen(s);
	if (c == 0)
		return ((char *)s + i);
	while (i >= 0)
	{
		if (s[i] == c)
			return ((char *)s + i);
		i--;
	}
	return (NULL);
}
char * ft_strrchr ( const char * s , int c ) { int i ; i = ft_strlen ( s ) ; if ( c == 0 ) return ( ( char * ) s + i ) ; while ( i >= 0 ) { if ( s [ i ] == c ) return ( ( char * ) s + i ) ; i -- ; } return ( NULL ) ; }
searches fo rht elast occurance of a char
within the str.
searches fo rht elast occurance of a char within the str .