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

# stralloc\_chop(3)

remove and return last char

## NAME

stralloc\_chop - remove and return last char

## SYNTAX

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

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

## DESCRIPTION

stralloc\_chop removes the last char in the stralloc (if it is empty, stralloc\_chop does nothing and returns -1).  This character is cast to unsigned char and returned.

## RETURN VALUE

chopped character, or -1 if string was empty.

## SEE ALSO

[stralloc\_chomp(3)](/stralloc_chomp/3.md)
