3 ms·
Pascal strings are weird. The first byte tells you the string's length. If the MSB of the first bit is set, the string's first 4 bytes tell you the length of t
by valarauca1 11y ago
Pascal strings are weird.
The first byte tells you the string's length. If the MSB of the first bit is set, the string's first 4 bytes tell you the length of the string. I mean yes its not a horrible system, but there are better systems.
I'll be honest I like Rust's. Just keep the length and the pointer on the stack in a tuple.