1ustrdup(3)                      Allegro manual                      ustrdup(3)
2
3
4

NAME

6       ustrdup - Duplicates a string. Allegro game programming library.
7

SYNOPSIS

9       #include <allegro.h>
10
11
12       char *ustrdup(const char *src)
13

DESCRIPTION

15       This  functions  copies  the  null-terminated string `src' into a newly
16       allocated area of memory, effectively duplicating it. Example:
17
18          void manipulate_string(const char *input_string)
19          {
20             char *temp_buffer = ustrdup(input_string);
21             /* Now we can modify temp_buffer */
22             ...
23

RETURN VALUE

25       Returns the newly allocated string. This memory must be  freed  by  the
26       caller.  Returns  NULL  if  it cannot allocate space for the duplicated
27       string.
28
29

SEE ALSO

31       _ustrdup(3), uconvert(3), ustrsize(3), ustrsizez(3), exconfig(3)
32
33
34
35Allegro                          version 4.2.2                      ustrdup(3)
Impressum