String
The String
structure is a simple utf-8 encoded string type that is used to represent text, prefixed with a size in bytes. It is commonly used in the network protocol to represent text data. This pattern of a size prefixed string is sometimes referred to as a "Pascal String".
Structure
Offset | Field Name | Field Type | Notes |
---|---|---|---|
0x00 | Size | be u16 | The size of the string in bytes. |
0x02 | Data | char[Size] | The utf-8 encoded string data. |