42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
my_memcmp.c File Reference

The file containing the my_memcmp function. More...

#include "mymemory.h"

Functions

int my_memcmp (const void *pointer1, const void *pointer2, size_t size)
 Compares the first (size) bytes of the two memory areas (pointer1 and pointer2)
 

Detailed Description

The file containing the my_memcmp function.

Author
Nicolas TORO

Function Documentation

◆ my_memcmp()

int my_memcmp ( const void * pointer1,
const void * pointer2,
size_t size )

Compares the first (size) bytes of the two memory areas (pointer1 and pointer2)

Parameters
pointer1The first memory area
pointer2The second memory area
sizeThe number of bytes to compare
Returns
int 0 if the strings are identical, otherwise the difference between the first different byte in the memory areas
Author
Nicolas TORO