Difference between revisions of "Lua:Class:StringStream"
Jump to navigation
Jump to search
(→Related Functions) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
− | StringStream '''class''': ('''Inheritance''': ''[[Stream]]''->''[[Object]]'') | + | StringStream '''class''': ('''Inheritance''': ''[[Lua:Class:Stream|Stream]]''->''[[Lua:Class:Object|Object]]'') |
− | Class for using [[Stream]] objects as a [[Strings]] based object. | + | Class for using [[Lua:Class:Stream|Stream]] objects as a [[Lua:Class:Strings|Strings]] based object. |
== Creation == | == Creation == | ||
− | ; [[createStringStream]]() : StringStream | + | ; [[Lua:createStringStream|createStringStream]]() : StringStream |
: Returns a newly created string steam. | : Returns a newly created string steam. | ||
Line 33: | Line 33: | ||
=== Related Classes === | === Related Classes === | ||
− | * [[MemoryStream]] | + | * [[Lua:Class:MemoryStream|MemoryStream]] |
− | * [[FileStream]] | + | * [[Lua:Class:FileStream|FileStream]] |
− | * [[Stream]] | + | * [[Lua:Class:Stream|Stream]] |
Latest revision as of 02:11, 25 January 2018
StringStream class: (Inheritance: Stream->Object)
Class for using Stream objects as a Strings based object.
Creation[edit]
- createStringStream() : StringStream
- Returns a newly created string steam.
Properties[edit]
- DataString : string
- The internal string
Examples[edit]
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