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

# ustrncat(3alleg)

Concatenates a string to another one, specifying size. Allegro game programming library.

## NAME

ustrncat - Concatenates a string to another one, specifying size. Allegro game programming library.

## SYNOPSIS

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

**char \*ustrncat(char \*dest, const char \*src, int n);**

## DESCRIPTION

This function is like ustrcat() except that no more than \`n' characters from \`src' are appended to the end of \`dest'. If the terminating null character in \`src' is reached before \`n' characters have been written, the null character is copied, but no other characters are written. If \`n' characters are written before a terminating null is encountered, the function appends its own null character to \`dest', so that \`n+1' characters are written. You should try to avoid this function because it is very easy to overflow the destination buffer. Use ustrzncat instead.

## RETURN VALUE

The return value is the value of \`dest'.

## SEE ALSO

[**uconvert**(3alleg)](/uconvert/3alleg.md), [**ustrcat**(3alleg)](/ustrcat/3alleg.md), [**ustrzncat**(3alleg)](/ustrzncat/3alleg.md)
