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


10.7 Deletion from an automatic string

— Function: void astr_zero (Autostr *astr)

Resets astr to be the empty string.

— Function: void astr_delete (Autostr *astr, ssize_t index, ssize_t n)

Deletes n characters from astr at position index. index must be non-negative and less than the length of astr. n may be negative; this indicates that all characters in the string from position index onwards should be deleted. n must be small enough that no attempt is made to delete characters beyond the end of the string.