Embedded TCP/IP stack: fnet_strncmp

FNET

fnet_int32_t fnet_strncmp ( const fnet_char_t str1,
const fnet_char_t str2,
fnet_size_t  n 
)

Compares part of two strings.

Parameters
str1Pointer to the null-terminated string to be compared.
str2Pointer to the null-terminated string to be compared.
nMaximum number of characters to compare.
Returns
This function returns zero if n characters of two strings are identical, otherwise returns the difference between the first two differing characters.

This function compares not more than n characters (characters that follow a null byte are not compared) from the two strings str1 and str2, returning zero if they all match or the difference between the first two differing characters.


© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net