---
name: "al_ustr_to_buffer"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_ustr_to_buffer"
---

# al\_ustr\_to\_buffer(3)

Allegro 5 API

## NAME

al\_ustr\_to\_buffer - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  void al_ustr_to_buffer(const ALLEGRO_USTR *us, char *buffer, int size)
  ```

## DESCRIPTION

Write the contents of the string into a pre-allocated buffer of the given size in bytes. The result will always be NUL terminated, so a maximum of `size - 1` bytes will be copied.

## SEE ALSO

[al\_cstr(3)](/al_cstr/3.md), [al\_cstr\_dup(3)](/al_cstr_dup/3.md)
