libowfat/stralloc/stralloc_chop.c

8 lines
143 B
C

#include <stralloc.h>
int stralloc_chop(stralloc* sa) {
if (sa->len==0) return -1;
--sa->len;
return (unsigned char)(sa->s[sa->len]);
}