libft
Loading...
Searching...
No Matches
ft_strncmp.c File Reference
#include "libft.h"

Go to the source code of this file.

Functions

int ft_strncmp (const char *s1, const char *s2, size_t n)
 String compare.
 

Function Documentation

◆ ft_strncmp()

int ft_strncmp ( const char *  s1,
const char *  s2,
size_t  n 
)

String compare.

Compares two strings and returns the difference of the first missmatch character or 0 if strings are equal.

Parameters
s1String
s2String
nNumber of characters to check
Returns
int 0 if equal else the difference of the first missmatch character

Definition at line 15 of file ft_strncmp.c.