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

# stralloc\_chomp(3diet)

remove trailing CR, LF or CRLF

## NAME

stralloc\_chomp - remove trailing CR, LF or CRLF

## SYNTAX

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

int **stralloc\_chomp**(stralloc\* *sa*);

## DESCRIPTION

stralloc\_chomp removes trailing CRLF, CR or LF from *sa* and returns the number of removed characters (i.e. 0, 1 or 2).

## RETURN VALUE

number of removed characters (0, 1, or 2).

## SEE ALSO

[stralloc\_chop(3)](/stralloc_chop/3.md)
