3 ms·
The speaker mentions it, seems like the return value is different: https://i.imgur.com/Jj2fMZu.png https://i.imgur.com/Jj2fMZu.png
by aboutruby 8y ago
The speaker mentions it, seems like the return value is different: https://i.imgur.com/Jj2fMZu.png https://i.imgur.com/Jj2fMZu.png
- Taniwha 8y agoyes - snprintf() returns the length of the string that would be written even if it wasn't clipped to the length of the output buffer - if you want to accumulate strings into a buffer using the output length to update the offset/size bad things will happen. scnprintf() returns the actual number of bytes written (less the null)