Archived
1
0
Fork 0

strbuf: added strbuf_avail and strbuf_appendf.

This commit is contained in:
Henrik Hautakoski 2011-02-04 17:18:21 +01:00
parent 6538fd9369
commit e67e03aceb
5 changed files with 59 additions and 1 deletions

View file

@ -30,11 +30,19 @@ Functions
This function will not allocate memory, it only sets ->len and
assure that the string is null-terminated at the new position.
`strbuf_avail()`::
Returns the number of characters that are allocated but not used in the buffer.
`strbuf_append()`::
This function will append the buffer with the contents of 'ptr'
and will always copy exactly 'len' bytes. (if memory can be obtained ofcourse)
`strbuf_appendf()`::
Adds the formated-string 'fmt' to the end of ->buf.
`strbuf_append_str()`::
Will add the 'str' C-string to the end of ->buf