Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Aren't those just P-strings with a semicolon?

https://en.wikipedia.org/wiki/String_%28computer_science%29#...



Pascal-style strings have the length stored in the first byte, so a string can only be 255 characters long. Netstrings have the length in text at the front of the string instead, so you need only preallocate a buffer of 20 characters to store the text representation of string lengths up to 2^64 bytes.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: