Lua:Class:StringStream

From Cheat Engine

Jump to: navigation, search

StringStream class: (Inheritance: Stream->Object)

Class for using Stream objects as a Strings based object.

Contents

[edit] Creation

createStringStream() : StringStream
Returns a newly created string steam.

[edit] Properties

DataString : string
The internal string

[edit] Examples

local fileStr = nil
local tableFile = findTableFile('PlayerBaseHook.CEA')
if tableFile ~= nil then
  local stringStream = createStringStream()
  stringStream.Position = 0 -- if not set before using 'copyFrom' the 'StringStream' object will be inconsistent.
  stringStream.copyFrom(tableFile.Stream, tableFile.Stream.Size)
  fileStr = stringStream.DataString
  stringStream.destroy()
end

[edit] See also

[edit] Related Functions

[edit] Related Classes

Personal tools
Toolbox