Function ndpi_strnstr
Defined in File ndpi_api.h
Function Documentation
-
char *ndpi_strnstr(const char *haystack, const char *needle, size_t len)
Finds the first occurrence of the substring ‘needle’ in the string ‘haystack’.
This function is similar to the standard
strstr()
function, but it has an additional parameterlen
that specifies the maximum length of the search.- Parameters:
haystack – The string to search in.
needle – The substring to search for.
len – The maximum length of the search.
- Returns:
Pointer to the first occurrence of ‘needle’ in ‘haystack’, or NULL if no match is found.