mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2026-11-30 15:01:45 +01:00
「✨」 feat(libft): added a very cool feature !
This commit is contained in:
1 parent
28128acd72
commit
59b810ffa4
64 files changed
+2063
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user