Corewar documentation 1.0.0
Loading...
Searching...
No Matches
my_strncmp.c File Reference

The file containing the my_strncmp function. More...

#include "my.h"

Functions

int my_strncmp (char const *s1, char const *s2, int n)
 Compares two strings (s1) and (s2) with a defined size (n)
 

Detailed Description

The file containing the my_strncmp function.

Author
Nicolas TORO

Function Documentation

◆ my_strncmp()

int my_strncmp ( char const * s1,
char const * s2,
int n )

Compares two strings (s1) and (s2) with a defined size (n)

Parameters
s1The first string to compare
s2The second string to compare
nThe size of the strings to compare
Returns
int 0 if the strings are identical, otherwise the difference between the first different characters in the strings
Author
Nicolas TORO