strndup
Name
strndup -- return a malloc'd copy of at most the specified number of bytes of a string
Synopsis
extern char
*strndup
(const char
*string, size_t
n);
Description
strndup returns a
malloc'd copy of at most n
bytes of string. The resultant string is
terminated even if no NULL terminator appears
before STRING[N].