---
name: "_ustrdup"
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/_ustrdup"
---

# \_ustrdup(3alleg)

Duplicates a string with a custom memory allocator. Allegro game programming library.

## NAME

\_ustrdup - Duplicates a string with a custom memory allocator. Allegro game programming library.

## SYNOPSIS

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

**char \*\_ustrdup(const char \*src, void\* (\*malloc\_func)(size\_t))**

## DESCRIPTION

Does the same as ustrdup(), but allows the user to specify a custom memory allocator function.

## SEE ALSO

[**ustrdup**(3alleg)](/ustrdup/3alleg.md), [**uconvert**(3alleg)](/uconvert/3alleg.md), [**ustrsize**(3alleg)](/ustrsize/3alleg.md), [**ustrsizez**(3alleg)](/ustrsizez/3alleg.md)
