---
name: "al_ustr_size_utf16"
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_ustr_size_utf16/3alleg5"
---

# al\_ustr\_size\_utf16(3alleg5)

Allegro 5 API

## NAME

al\_ustr\_size\_utf16 - Allegro 5 API

## SYNOPSIS

-

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

## DESCRIPTION

Returns the number of bytes required to encode the string in UTF-16 (including the terminating 0). Usually called before al\_ustr\_encode\_utf16(3alleg5) to determine the size of the buffer to allocate.

## SEE ALSO

al\_ustr\_size(3alleg5)
