Function ndpi_strndup
Defined in File ndpi_api.h
Function Documentation
-
char *ndpi_strndup(const char *s, size_t size)
Duplicate a string with length limit using nDPI’s memory allocator. The returned string must be freed with ndpi_free().
- Parameters:
s – String to duplicate
size – Maximum number of characters to copy (excluding null terminator)
- Returns:
Pointer to newly allocated string copy, or NULL on failure