Difference between revisions of "Lua:byteTableToString"

From Cheat Engine
Jump to navigation Jump to search
m (Added CodeBox Template.)
m
Line 31: Line 31:
 
{{LuaSeeAlso}}
 
{{LuaSeeAlso}}
  
=== Related Functions ===
+
{{RelatedStrings}}
* [[ansiToUtf8]]
+
 
* [[utf8ToAnsi]]
 
* [[translate]]
 
 
{{ReadWriteMemory}}
 
{{ReadWriteMemory}}

Revision as of 20:45, 24 June 2026

<> Lua API Reference

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

Main Pages

Core Lua documentation entry points

Lua
Script Engine

String Related Lua Functions

Encoding conversion and localized text helpers