---
name: "stralloc_cats"
section: "3diet"
platform: "linux"
package: "libowfat-dev"
version: "0.28-2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/stralloc_cats/3diet"
---

# stralloc\_cats(3diet)

append data to a stralloc

## NAME

stralloc\_cats - append data to a stralloc

## SYNTAX

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

int **stralloc\_cats**(stralloc\* *sa*,const char\* *buf*);

## DESCRIPTION

stralloc\_cats appends a \\0-terminated string from *buf* to the end of the string stored in *sa*, allocating space if necessary, and returns 1. If *sa* is unallocated, stralloc\_cats is the same as stralloc\_copys. If it runs out of memory, stralloc\_cats leaves *sa* alone and returns 0.

## RETURN VALUE

1 for success, 0 on memory allocation failure.

## SEE ALSO

[stralloc\_copyb(3)](/stralloc_copyb/3.md)
