MicrOS
strncmp.c File Reference
#include "../string.h"

Functions

int strncmp (const char *str1, const char *str2, size_t num)
 Compare two strings using locale. More...
 

Function Documentation

◆ strncmp()

int strncmp ( const char *  str1,
const char *  str2,
size_t  num 
)

Compare two strings using locale.

Compares up to num characters of the C string str1 to those of the C string str2.

Parameters
str1C string to be compared.
str2C string to be compared.
Returns
Returns an integral value indicating the relationship between the content of the memory blocks (<0: value in ptr1 was lower than in ptr2, 0: both are equals, >0: value in ptr2 was greater than in ptr2).