|
NAMEstrndup - duplicate part of a stringSYNOPSIS#include <publib.h> char *strndup(const char *str, size_t n); DESCRIPTIONstrndup will make a duplicate of the n first characters of str, using malloc(3) to allocate memory for the duplicate. The caller is supposed to free the duplicate's memory when no longer needed.RETURN VALUEstrndup will return a pointer to the duplicate, or NULL if no memory could be allocated.SEE ALSOpublib(3), strdup(3)AUTHORLars Wirzenius (lars.wirzenius@helsinki.fi)
Visit the GSP FreeBSD Man Page Interface. |