---
name: "al_ustr_rfind_str"
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_rfind_str"
---

# al\_ustr\_rfind\_str(3)

Allegro 5 API

## NAME

al\_ustr\_rfind\_str - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  int al_ustr_rfind_str(const ALLEGRO_USTR *haystack, int end_pos,
     const ALLEGRO_USTR *needle)
  ```

## DESCRIPTION

Find the last occurrence of string `needle` in `haystack` before byte offset `end_pos` (exclusive). Return the byte offset of the occurrence if it is found, otherwise return -1.

## SEE ALSO

[al\_ustr\_rfind\_cstr(3)](/al_ustr_rfind_cstr/3.md), [al\_ustr\_find\_str(3)](/al_ustr_find_str/3.md)
