Embedded TCP/IP stack  4.7.0

◆ fnet_strnlen()

fnet_size_t fnet_strnlen ( const fnet_char_t str,
fnet_size_t  max_len 
)

Calculate the length of a fixed-size string.

Parameters
strPointer to the null-terminated string to be examined.
max_lenMaximum number of characters to examine.
Returns
This function returns the number of characters in the str string or max_len if the null character was not found.

This function computes the number of bytes in the string to which str points, not including the terminating null character, but at most max_len. The function never examines more than max_len bytes of the string.


© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net