maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_strchr.c File Reference
#include "libft.h"
Include dependency graph for ft_strchr.c:

Go to the source code of this file.

Functions

char * ft_strchr (const char *s, int c)
 

Function Documentation

◆ ft_strchr()

char * ft_strchr ( const char *  s,
int  c 
)

Definition at line 25 of file ft_strchr.c.

26{
27 unsigned char uc;
28
29 uc = (unsigned char)c;
30 while (*s != '\0' && *s != uc)
31 s++;
32 if (*s == uc)
33 return ((char *)s);
34 return (NULL);
35}

Referenced by add_env(), add_env_node(), add_shell_var_node(), ft_exclude_delimiters(), handle_add_set_shell_variable(), handle_local_vars(), handle_phrase(), and tokenise().

Here is the caller graph for this function: