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

Go to the source code of this file.

Functions

int ft_strcmp (const char *s1, const char *s2)
 

Function Documentation

◆ ft_strcmp()

int ft_strcmp ( const char *  s1,
const char *  s2 
)

Definition at line 24 of file ft_strcmp.c.

25{
26 while (*s1 != '\0' || *s2 != '\0')
27 {
28 if (*s1 != *s2)
29 return ((unsigned char)*s1 - (unsigned char)*s2);
30 s1++;
31 s2++;
32 }
33 return (0);
34}

Referenced by builtin_echo(), builtin_env(), builtin_export(), execute(), exit_status_adj(), expand_env_and_loc_var(), get_env(), get_shell_variable(), open_file(), open_tmp_file(), print_env(), set_env(), set_shell_var(), str_start_adj(), test_get_env(), test_set_env(), test_unset_env(), unset_env(), and write_heredoc_lines().

Here is the caller graph for this function: