「✨」 feat(libft): added a very cool feature !

This commit is contained in:
KeyZox committed 2024-04-24 10:53:46 +02:00
1 parent 28128acd72
commit 59b810ffa4
64 files changed
+2063

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strchr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/01 15:45:18 by adjoly #+# #+# */
/* Updated: 2024/02/04 14:44:11 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_strchr(const char *s, int c)
{
size_t len_s;
char *result;
len_s = ft_strlen(s);
result = ft_memchr(s, c, len_s);
if (c == 0)
return ((char *)s + len_s);
return (result);
}