Jump to content

LumpReadString: Difference between revisions

Update after the Lump Reading API refactor
(Created page with "{{ACSWarning}} {{DevfeatureWarning|version=3.2|type=an ACS function}} {{stub}} int '''LumpReadString''' (int ''lump'', int ''pos'') {{Devfeature|3.2|alpha}} ==Usage== Reads a string from a lump, stopping upon encountering a null terminator or the end of the lump. ===Parameters=== * ''lump'': The lump index as returned from <tt>LumpOpen</tt>. * ''pos'': The byte position in the lump to start reading the string from. ===Return value=== Returns the string that w...")
Tag: Source edit
 
(Update after the Lump Reading API refactor)
Tag: Source edit
Line 1: Line 1:
{{ACSWarning}}
{{ACSWarning}}
{{DevfeatureWarning|version=3.2|type=an [[ACS]] function}}
{{DevfeatureWarning|version=3.2|type=an [[ACS]] function}}
{{stub}}


int '''LumpReadString''' (int ''lump'', int ''pos'') {{Devfeature|3.2|alpha}}
int '''LumpReadString''' (int ''lump'', int ''pos'' [, int ''length'']) {{Devfeature|3.2|alpha}}


==Usage==
==Usage==
Line 11: Line 10:
* ''lump'': The lump index as returned from <tt>[[LumpOpen]]</tt>.
* ''lump'': The lump index as returned from <tt>[[LumpOpen]]</tt>.
* ''pos'': The byte position in the lump to start reading the string from.
* ''pos'': The byte position in the lump to start reading the string from.
* ''length'': The maximum number of characters to read.


===Return value===
===Return value===
Returns the string that was read.
Returns the string that was read.
Note the string returned might have a shorter length than what is specified by the ''length'' parameter, should the end of the file be reached.


==Examples==
==Examples==