Difference between revisions of "Lua:readString"

From Cheat Engine
Jump to navigation Jump to search
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''function''' readString(''Address'', ''Maxlength'')
+
[[Category:Lua]]
 +
'''function''' readString(''Address'', ''Maxlength'', ''isWideString'') ''':''' string
  
Reads the bytes the given address and interprets them as a string
+
Reads the bytes at the given address and interprets them as a string
  
 
===Function Parameters===
 
===Function Parameters===
Line 16: Line 17:
 
|Integer
 
|Integer
 
|The maximum number of characters to read. If the string does not have a 0-terminator this will be the length of the string returned
 
|The maximum number of characters to read. If the string does not have a 0-terminator this will be the length of the string returned
 +
|-
 +
|isWideString
 +
|Boolean
 +
|Determines if this string is read out as a widestring or a normal ascii string
 
|}
 
|}
  
== See also ==
+
{{LuaSeeAlso}}
* [[readBytes]]
+
 
* [[readInteger]]
+
=== Related Functions ===
* [[readFloat]]
+
* [[ansiToUtf8]]
* [[readDouble]]
+
* [[utf8ToAnsi]]
* [[Lua]]
+
* [[translate]]
 +
{{ReadWriteMemory}}

Latest revision as of 00:02, 25 January 2018

function readString(Address, Maxlength, isWideString) : string

Reads the bytes at the given address and interprets them as a string

Function Parameters[edit]

Parameter Type Description
Address CEAddressString or Integer The address to read
Maxlength Integer The maximum number of characters to read. If the string does not have a 0-terminator this will be the length of the string returned
isWideString Boolean Determines if this string is read out as a widestring or a normal ascii string

See also[edit]

Related Functions[edit]