---
name: "al_cstr_dup"
section: "3alleg5"
platform: "linux"
package: "allegro5-doc"
version: "2:5.2.10.1+dfsg-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/al_cstr_dup/3alleg5"
---

# al\_cstr\_dup(3alleg5)

Allegro 5 API

## NAME

al\_cstr\_dup - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  char *al_cstr_dup(const ALLEGRO_USTR *us)
  ```

## DESCRIPTION

Create a NUL (`'\0'`) terminated copy of the string. Any embedded NUL bytes will still be presented in the returned string. The new string must eventually be freed with al\_free(3alleg5).

If an error occurs NULL is returned.

## SEE ALSO

al\_cstr(3alleg5), al\_ustr\_to\_buffer(3alleg5), al\_free(3alleg5)
