ustrdup (3) - Linux Manuals
ustrdup: Duplicates a string. Allegro game programming library.
Command to display ustrdup
manual in Linux: $ man 3 ustrdup
NAME
ustrdup - Duplicates a string. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
char *ustrdup(const char *src)
DESCRIPTION
This functions copies the null-terminated string `src' into a newly
allocated area of memory, effectively duplicating it. Example:
void manipulate_string(const char *input_string)
{
char *temp_buffer = ustrdup(input_string);
/* Now we can modify temp_buffer */
...
RETURN VALUE
Returns the newly allocated string. This memory must be freed by the
caller. Returns NULL if it cannot allocate space for the duplicated string.
Pages related to ustrdup
- ustr (3) - ustr string library functions
- ustr_const (3) - ustr string library constants
- ustrcat (3) - Concatenates a string to another one. Allegro game programming library.
- ustrchr (3) - Finds the first occurrence of a character in a string. Allegro game programming library.
- ustrcmp (3) - Compares two strings. Allegro game programming library.
- ustrcpy (3) - Copies a string into another one. Allegro game programming library.
- ustrerror (3) - Returns a string describing errno. Allegro game programming library.
- ustricmp (3) - Compares two strings ignoring case. Allegro game programming library.
- ustrlwr (3) - Replaces all letters with lower case. Allegro game programming library.