2001-02-02 17:54:47 +00:00
|
|
|
#include "stralloc.h"
|
|
|
|
|
2004-11-25 21:29:35 +00:00
|
|
|
/* stralloc_append adds one byte in[0] to the end of the string stored
|
|
|
|
* in sa. It is the same as stralloc_catb(&sa,in,1). */
|
2005-04-23 15:50:16 +00:00
|
|
|
int stralloc_append(stralloc *sa,const char *in) {
|
2001-02-02 17:54:47 +00:00
|
|
|
if (stralloc_readyplus(sa,1)) {
|
|
|
|
sa->s[sa->len]=*in;
|
|
|
|
++sa->len;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|