Products
and Services Support
and Docs Training Partner Programs About Red
Hat
  download storecart
red hat logo
redhat.comredhat network

Red Hat Documentation: man pages: man3: Linux Programmer's Manual (3)

Manpage of STRDUP

STRDUP

Section: Linux Programmer's Manual (3)
Updated: April 12, 2025
Index  

NAME

strdup - duplicate a string  

SYNOPSIS

#include <string.h>
char *strdup(const char *s);
 

DESCRIPTION

The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is  

RETURN VALUE

The strdup() function returns a pointer to the duplicated string, or NULL if insufficient memory was available.  

ERRORS

ENOMEM
Insufficient memory available to allocate duplicate string.
 

CONFORMING TO

SVID 3, BSD 4.3  

SEE ALSO


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO

This document was created by using the manual pages.
Time: 11:58:06 GMT, March 24, 2025

 

 


 
© 2001 Red Hat, Inc. All rights reserved.
About Red Hat  :  Legal statement  :  Privacy statement  :  Y2K statement  :  Contact Red Hat