Difference between revisions of "Lua:Class:StringStream"
Jump to navigation
Jump to search
(Created page with 'StringStream '''class''': ('''Inheritance''': ''Stream''->''Object'') Class for using Stream objects as a Strings based object. == Properties == ; DataString…') |
|||
Line 15: | Line 15: | ||
stringStream.copyFrom(tableFile.Stream, tableFile.Stream.Size) | stringStream.copyFrom(tableFile.Stream, tableFile.Stream.Size) | ||
fileStr = stringStream.DataString | fileStr = stringStream.DataString | ||
− | stringStream. | + | stringStream.destroy() |
end | end | ||
Revision as of 06:23, 11 March 2017
StringStream class: (Inheritance: Stream->Object)
Class for using Stream objects as a Strings based object.
Properties
- DataString : string
- The internal string
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