3 ms·
You didn't read my comment right. My statement is there isn't one true string type. I didn't say you shouldn't use a length field. Zero terminated strings stil
by jstimpfle 5y ago
You didn't read my comment right. My statement is there isn't one true string type. I didn't say you shouldn't use a length field.
Zero terminated strings still make some sense of course - ease of reading when looking at byte level representation, and moderate cost savings in packed structs (4, 8, or 16 byte strings). The former is why I zero terminate by default where possible, even when using a separate length field stored somewhere else (almost always).