---
name: "stralloc_diff"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/stralloc_diff"
---

# stralloc\_diff(3)

compare two strallocs

## NAME

stralloc\_diffs - compare two strallocs

## SYNTAX

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

int **stralloc\_diff**(const stralloc\* *a*,const stralloc\* *b*);

## DESCRIPTION

stralloc\_diff returns negative, 0, or positive, depending on whether *a* is lexicographically smaller than, equal to, or greater than the string *b*.

## RETURN VALUE

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

## SEE ALSO

[stralloc\_diffs(3)](/stralloc_diffs/3.md), [stralloc\_starts(3)](/stralloc_starts/3.md)
