Your company here ā€” click to reach over 10,000 unique daily visitors

ustrdup - Man Page

Duplicates a string. Allegro game programming library.


#include <allegro.h>

char *ustrdup(const char *src)


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.

See Also

_ustrdup(3), uconvert(3), ustrsize(3), ustrsizez(3), exconfig(3)

Referenced By

exconfig(3), _ustrdup(3).

version 4.4.3 Allegro manual