logoalt Hacker News

ranger_dangerlast Saturday at 4:24 AM1 replyview on HN

> the word "null term" appears in the ascii art diagram

Yes but it does not appear anywhere in the struct that I can see... I would love to be proven wrong though.


Replies

fsckboylast Saturday at 4:07 PM

the string needs a null terminator to be C-string compatible. the trick of putting a count at the end that turns into a null terminator at the right moment will save a byte, regardless of how it is labelled