STRDUP
Section: C Library Functions (3)
Index
Return to Main Contents
BSD mandoc
NAME
strdup
- save a copy of a string
SYNOPSIS
Fd #include <string.h>
Ft char *
Fn strdup const char *str
DESCRIPTION
The
Fn strdup
function
allocates sufficient memory for a copy
of the string
Fa str ,
does the copy, and returns a pointer to it.
The pointer may subsequently be used as an
argument to the function
free(3).
SEE ALSO
free(3),
malloc(3),
Xt strcpy 3 ,
Xt strlen 3
HISTORY
The
Fn strdup
function
Ud .
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- SEE ALSO
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 15:52:54 GMT, January 15, 2023