Function rcutils_strnlen
Defined in File strnlen.h
Function Documentation
-
size_t rcutils_strnlen(const char *s, size_t maxlen)
Determine the length of a fixed-size string.
- Parameters:
s – [in] Null terminated string to find the length of.
maxlen – [in] Maximum length to look to find the trailing \0.
- Returns:
The length of the string if it is less than maxlen, or
- Returns:
maxlen if there is no \0 among the first maxlen characters.