logoalt Hacker News

ranger_dangerlast Friday at 10:56 PM1 replyview on HN

> The null terminator is a wasted field

I think that would break its "Compatible with normal C string functions" feature.


Replies

fsckboylast Friday at 11:05 PM

nooooo you don't understand. when the buffer is not full, the string will be zero terminated "in buffer" (which is how it works as is anyway). when the buffer is full, the "free count" at the end will do double duty, both as a zero count and a zero terminater

show 1 reply