---
name: "al_fget_ustr"
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_fget_ustr"
---

# al\_fget\_ustr(3)

Allegro 5 API

## NAME

al\_fget\_ustr - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  ALLEGRO_USTR *al_fget_ustr(ALLEGRO_FILE *f)
  ```

## DESCRIPTION

Read a string of bytes terminated with a newline or end-of-file. The line terminator(s), if any, are included in the returned string.

On success returns a pointer to a new ALLEGRO\_USTR structure. This must be freed eventually with [al\_ustr\_free(3)](/al_ustr_free/3.md). Returns NULL if an error occurred or if the end of file was reached without reading any bytes.

See [al\_fopen(3)](/al_fopen/3.md) about translations of end-of-line characters.

## SEE ALSO

[al\_fgetc(3)](/al_fgetc/3.md), [al\_fgets(3)](/al_fgets/3.md)
