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

# stralloc\_catb(3diet)

append data to a stralloc

## NAME

stralloc\_catb - append data to a stralloc

## SYNTAX

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

int **stralloc\_catb**(stralloc\* *sa*,const char\* *buf*,size\_t *len*);

## DESCRIPTION

stralloc\_catb adds the string *buf*\[0\], *buf*\[1\], ... *buf*\[*len*-1\] to the end of the string stored in *sa*, allocating space if necessary, and returns 1. If *sa* is unallocated, stralloc\_catb is the same as stralloc\_copyb. If it runs out of memory, stralloc\_catb leaves *sa* alone and returns 0.

## RETURN VALUE

1 for success, 0 on memory allocation failure.
