Function rcutils_findn

Function Documentation

size_t rcutils_findn(const char *str, char delimiter, size_t string_length)

Return the first index of a character in a string of specified length.

Identical to rcutils_find_first() but without relying on the string to be a null terminated c string.

Parameters:
  • str[in] string to search

  • delimiter[in] the character to search for

  • string_length[in] length of the string to search

Returns:

the index of the first occurence of the delimiter if found, or

Returns:

SIZE_MAX for invalid arguments, or

Returns:

SIZE_MAX if the delimiter is not found.