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

# stralloc\_starts(3diet)

check if string is prefix of stralloc

## NAME

stralloc\_starts - check if string is prefix of stralloc

## SYNTAX

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

int **stralloc\_starts**(stralloc\* *sa*,const char\* *in*);

## DESCRIPTION

stralloc\_starts returns 1 if the \\0-terminated string in *in*, without the terminating \\0, is a prefix of the string stored in *sa*. Otherwise it returns 0. *sa* must already be allocated.

## RETURN VALUE

1 if *in* is a prefix of *sa*, otherwise 0.

## SEE ALSO

str\_starts(3)
