mirror of
https://github.com/LucasCodeur/alcu.git
synced 2026-11-01 09:02:03 +01:00
input validation
This commit is contained in:
1 parent
b8a983387e
commit
b673d52c6b
48 files changed
+1705
No files matched your search
@@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strchr.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/05 17:24:37 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/12 13:54:20 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
char *ft_strchr(const char *s, int c)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (s[i])
|
||||
{
|
||||
if ((unsigned char) s[i] == (unsigned char) c)
|
||||
return ((char *) s + i);
|
||||
i++;
|
||||
}
|
||||
if ((unsigned char) s[i] == (unsigned char) c)
|
||||
return ((char *) s + i);
|
||||
return (NULL);
|
||||
}
|
||||
Reference in new issue
Block a user