28 lines
1.0 KiB
C
28 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strrchr.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/09/27 08:25:33 by cchauvet #+# #+# */
|
|
/* Updated: 2022/09/27 11:29:58 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
char *strrchr(const char *s, int c)
|
|
{
|
|
char *ret;
|
|
|
|
ret = NULL;
|
|
while (*s)
|
|
{
|
|
if (*s == (char) c)
|
|
ret = (char *) s;
|
|
s++;
|
|
}
|
|
return (ret);
|
|
}
|