Archived
1
0
Fork 0

docs/strbuf.txt: added strbuf_explode and strbuf_free_list

This commit is contained in:
Henrik Hautakoski 2010-11-28 10:23:22 +01:00
parent b6ab5c88a8
commit 6b2465dce2

View file

@ -70,6 +70,15 @@ NOTE: This doesn't shrink the memory block
ensure that ->buf is terminated with 'ch'. Will not change ->buf if it is already terminated.
`strbuf_explode()`::
Returns a NULL terminated list of string buffers, each containing a substring of 'str' splitted by delimiter'. +
Returns `NULL` if 'delimiter' does not exists in 'str'.
+
TIP: use `strbuf_free_list()` to free the entire list.
+
NOTE: 'delimiter' is not included in the list.
`strbuf_release()`::
This function should be used to detach the ->buf member from the `strbuf_t` structure. +
@ -78,3 +87,7 @@ NOTE: This doesn't shrink the memory block
`strbuf_free()`::
Free's all the memory (allocated on the heap) associted with the `strbuf_t` structure.
`strbuf_free_list()`::
Free's all the memory from an NULL terminated list of string buffers.