A Pascal-style string contains one high byte ( length ), followed by length bytes of character data.
This means that Pascal-style strings can only encode strings between 0 and 255 characters long (assuming single-byte character encodings such as ASCII).
Alternatively, another popular string encoding is C-style strings that do not have a length specifier but use null bytes to indicate the end of a string. Therefore, they do not have a length limit.
However, other encodings may use more prefix bytes to facilitate longer strings. Terminator bytes / hourly can also be used with length prefixes.
Drew noakes
source share