Skip to content

g_strsplit: Use a pre-allocated GArray when max_tokens is provided

Marco Trevisan requested to merge 3v1n0/glib:strsplit-pre-allocated-array into main

In case max_tokens is provided, we can safely pre-allocate the GArray to the max_tokens value plus one for the NULL terminating value.

Merge request reports