Next: , Previous: Autostr copying, Up: Automatic strings


10.5 Concatenation onto an automatic string

— Function: int astr_cat (Autostr *dest, const Autostr *src)

Concatenates a copy of the contents of src onto the end of the contents of dest. Returns 0 if the function succeeded, or -1 if there was insufficient memory.

— Function: int astr_cat_s (Autostr *astr, const char *chars)

Concatenates a copy of the characters referenced by chars onto the end of the contents of astr. Returns 0 if the function succeeded, or -1 if there was insufficient memory.

— Function: int astr_cat_c (Autostr *astr, int c)

Concatenates c (converted to a ‘char’) onto the end of the contents of astr. c may not be zero. Returns 0 if the function succeeded, or -1 if there was insufficient memory.