feat: add ft_strrchr function

also add ft_strchr content
This commit is contained in:
2025-10-08 10:31:48 +02:00
parent 1fd9f0c776
commit c25260933d
2 changed files with 27 additions and 0 deletions

12
libft.h
View File

@@ -104,6 +104,18 @@ int ft_toupper(int c);
*/
int ft_tolower(int c);
/*
The ft_strchr() function locates the
first occurrence of c (converted to
a char) in the string pointed to by s.
*/
char *ft_strchr(const char *s, int c);
/*
The strrchr() function is identical
to strchr() except it locates the
last occurrence of c.
*/
char *ft_strrchr(const char *s, int c);
#endif