4 ms·
If only this existed in the C standard... You can call snprintf twice, the first time with a NULL buffer and zero-sized length, and the second with a newly all
by vortico 8y ago
If only this existed in the C standard...
You can call snprintf twice, the first time with a NULL buffer and zero-sized length, and the second with a newly allocated buffer with the size equal to the return value of the first snprintf call.