Duplicate a substring of the string s.
@param s string to be duplicated
@param len the maximum length of the resulting string (not counting the
terminating byte).
@return Pointer to a newly-allocated string containing a
copy of s or NULL if the string cannot be allocated.
Duplicate a substring of the string s. @param s string to be duplicated @param len the maximum length of the resulting string (not counting the terminating byte). @return Pointer to a newly-allocated string containing a copy of s or NULL if the string cannot be allocated.