28 lines
1.0 KiB
C
28 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strrchr_n.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: scebula <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* 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);
|
|
}
|