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


10.3 Getting information about automatic strings

— Function: int astr_valid_p (const Autostr *astr)

Returns non-zero iff the memory referenced by astr represents a valid ‘Autostr’.

— Function: const char * astr_chars (const Autostr *astr)

Returns a pointer to the first character in astr; the characters thus referenced are terminated by a null character. This pointer returned is only guaranteed to be valid until the next call of a function which takes a non-‘const’ version of astr.

— Function: ssize_t astr_length (const Autostr *astr)

Returns the number of characters in astr, excluding the terminating null character.