ustrdup(3alleg4)

ustrdup3alleg4

Duplicates a string. allegro game programming library.

Usage

#include <allegro.h>

char *ustrdup(const char *src)

Overview

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.

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

From allegro4-doc 2:4.4.3.1-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.