Lua:byteTableToString

From Cheat Engine
Revision as of 23:12, 4 December 2025 by Leunsel (talk | contribs) (Added CodeBox Template.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
<> Function

function byteTableToString(Table) : String

Converts a table of bytes to a string, where each byte represents the ASCII/ANSI value of the corresponding character.

Function Parameters

Parameter Type Description
Table Table A table containing the bytes to convert to a string.

Returns

String — The resulting string formed from the byte values.

Explanation

Each element in the table is interpreted as a character code (byte), and the resulting string is constructed by concatenating these characters in order.

For example, byteTableToString({0x41, 0x42, 0x43}) returns "ABC".

Examples

local str = byteTableToString({0x41, 0x42, 0x43})
print(str) -- Output: ABC

See also

Lua
Script Engine

Related Functions

Read Functions
readBytes
readSmallInteger
readInteger
readQword
readPointer
readFloat
readDouble
readString
Read Functions (Local Process)
readBytesLocal
readIntegerLocal
readQwordLocal
readPointerLocal
readFloatLocal
readDoubleLocal
readStringLocal
Write Functions
writeBytes
writeSmallInteger
writeInteger
writeQword
writeFloat
writeDouble
writeString
Write Functions (Local Process)
writeBytesLocal
writeIntegerLocal
writeQwordLocal
writeFloatLocal
writeDoubleLocal
writeStringLocal
Byte Table Conversions (Value → Byte Table)
wordToByteTable
dwordToByteTable
qwordToByteTable
floatToByteTable
doubleToByteTable
stringToByteTable
wideStringToByteTable
Byte Table Conversions (Byte Table → Value)
byteTableToWord
byteTableToDword
byteTableToQword
byteTableToFloat
byteTableToDouble
byteTableToString
byteTableToWideString