---
name: "ustrstr"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/ustrstr"
---

# ustrstr(3alleg)

Finds the first occurrence of a string in another one. Allegro game programming library.

## NAME

ustrstr - Finds the first occurrence of a string in another one. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**char \*ustrstr(const char \*s1, const char \*s2);**

## DESCRIPTION

This function finds the first occurrence of string \`s2' in string \`s1'. Example:

```
   char *p = ustrstr("hello world", "world");
```

## RETURN VALUE

Returns a pointer within \`s1', or NULL if \`s2' wasn't found.

## SEE ALSO

[**uconvert**(3alleg)](/uconvert/3alleg.md), [**ustrchr**(3alleg)](/ustrchr/3alleg.md), [**ustrrchr**(3alleg)](/ustrrchr/3alleg.md), [**ustrpbrk**(3alleg)](/ustrpbrk/3alleg.md), [**ustrtok**(3alleg)](/ustrtok/3alleg.md)
