Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeUTF16LE ¶
DecodeUTF16LE decodes UTF-16 little endian bytes to a string
This function takes a byte slice and decodes it to a string. It creates a slice of uint16 values with half the length of the byte slice, and fills it with the UTF-16 little endian decoded values. Then, it uses the utf16.Decode function to convert the uint16 slice to a string.
Returns:
- A string representing the UTF-16 little endian decoded byte slice.
func EncodeUTF16LE ¶
EncodeUTF16LE encodes a string to UTF-16 little endian bytes
This function takes a string and encodes it to UTF-16 little endian bytes. It uses the utf16.Encode function to convert the string to a slice of uint16 values. Then, it creates a byte slice with twice the length of the utf16le slice, and fills it with the UTF-16 little endian encoded values.
Returns:
- A byte slice representing the UTF-16 little endian encoded string.
Types ¶
This section is empty.