GStringChunk should offer a g_string_chunk_alloc(gssize len) method
Submitted by Florin Iucha
Link to original bug (#473226)
Description
Sometimes you know the size of the string you want to insert into the string chunk before you have the string itself (reading from a file descriptor, for instance) and would like to read the string directly into the chunk, in order to avoid extra memory allocation and copying around.
A g_string_chunk_alloc(gssize len) method would fit the bill perfectly: it would allocate the space inside the string chunk and return a pointer to the a memory buffer, at least 'len' bytes long.
Version: 2.14.x