3 ms·
Because the API is stupid and not intuitive. It's for memory buffers where the string is either NULL terminated or it is the length of the memory buffer. This s
by russdill 8y ago
Because the API is stupid and not intuitive. It's for memory buffers where the string is either NULL terminated or it is the length of the memory buffer. This saves an extra byte. yay?
- russdill 8y agoI'll add that it's really handy for that specific situation as it also avoids leaking uninitialized bytes.