tgrekov-libft
HIVE libft Oct 2023
Loading...
Searching...
No Matches
ft_strncmp.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strncmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 17:25:34 by tgrekov #+# #+# */
/* Updated: 2023/11/09 20:52:51 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_strncmp.c.

#include "libft.h"
Include dependency graph for ft_strncmp.c:

Go to the source code of this file.

Functions

int ft_strncmp (const char *s1, const char *s2, size_t n)
 Compare up to n characters of string s1 with string s2.
 

Function Documentation

◆ ft_strncmp()

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

Compare up to n characters of string s1 with string s2.

Parameters
[in]s1Optionally null-terminated string
[in]s2Optionally null-terminated string
[in]nMaximum number of characters to compare
Return values
intResult of subtracting the differing character of s2 from that of s1.
If no difference was found in n characters, or before the strings were terminated, returns 0.

Definition at line 33 of file ft_strncmp.c.