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

# al\_fget\_ustr(3alleg5)

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(3alleg5). Returns NULL if an error occurred or if the end of file was reached without reading any bytes.

See al\_fopen(3alleg5) about translations of end-of-line characters.

## SEE ALSO

al\_fgetc(3alleg5), al\_fgets(3alleg5)
