Lua:wideStringToByteTable
Jump to navigation
Jump to search
function wideStringToByteTable(String) : Table
Converts a string to a wide string (UTF-16/Unicode) and then to a table of bytes.
Function Parameters
Parameter | Type | Description |
---|---|---|
String | String | The string to convert to a wide string and then to a byte table. |
Returns
Table — A table containing the bytes representing the wide string (UTF-16/Unicode).
Examples
local bytes = wideStringToByteTable("ABC") for i, b in ipairs(bytes) do print(string.format("Byte %d: %02X", i, b)) end -- Output: 6 bytes representing "A", "B", "C" as UTF-16LE (e.g., 41 00 42 00 43 00)
See also
Related Functions
- ansiToUtf8
- utf8ToAnsi
- translate
- readBytes
- readSmallInteger
- readInteger
- readQword
- readPointer
- readFloat
- readDouble
- readString
- writeBytes
- writeSmallInteger
- writeInteger
- writeQword
- writeFloat
- writeDouble
- writeString
- readBytesLocal
- readIntegerLocal
- readQwordLocal
- readPointerLocal
- readFloatLocal
- readDoubleLocal
- readStringLocal
- writeBytesLocal
- writeIntegerLocal
- writeQwordLocal
- writeFloatLocal
- writeDoubleLocal
- writeStringLocal
- wordToByteTable
- dwordToByteTable
- qwordToByteTable
- floatToByteTable
- doubleToByteTable
- stringToByteTable
- wideStringToByteTable
- byteTableToWord
- byteTableToDword
- byteTableToQword
- byteTableToFloat
- byteTableToDouble
- byteTableToString
- byteTableToWideString