tgrekov-fdf
HIVE fdf May 2024
Loading...
Searching...
No Matches
ft_memcmp.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memcmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/24 17:54:51 by tgrekov #+# #+# */
/* Updated: 2023/11/04 22:46:48 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file ft_memcmp.c.

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

Go to the source code of this file.

Functions

int ft_memcmp (const void *s1, const void *s2, size_t n)
 Compares n bytes of byte string s1 against byte string s2.
 

Function Documentation

◆ ft_memcmp()

int ft_memcmp ( const void *  s1,
const void *  s2,
size_t  n 
)

Compares n bytes of byte string s1 against byte string s2.

Comparisons are done with unsigned char.

Parameters
[in]s1First byte string to compare
[in]s2Second byte string to compare
[in]nNumber of bytes to compare
Return values
intResult of subtracting the differing byte of s2 from that of s1.
If no difference was found in n bytes, returns 0.

Definition at line 34 of file ft_memcmp.c.