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

# stralloc\_diffs(3diet)

check if string is prefix of stralloc

## NAME

stralloc\_diffs - check if string is prefix of stralloc

## SYNTAX

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

int **stralloc\_diffs**(stralloc\* *a*,const char\* *b*);

## DESCRIPTION

stralloc\_diffs returns negative, 0, or positive, depending on whether the \\0-terminated string in *a*, without the terminating \\0, is lexicographically smaller than, equal to, or greater than the string stored in *a*.

## RETURN VALUE

\<0 if a\<b, 0 if a==b, \>0 if a\>b.

## SEE ALSO

[stralloc\_diff(3)](/stralloc_diff/3.md), [stralloc\_starts(3)](/stralloc_starts/3.md), [str\_diff(3)](/str_diff/3.md)
