Parameters & Returns
Parameters
Returns
Quick Summary
Reads a length-prefixed string from a file.
Takes a file handle.
Returns a string read in length-prefixed format, or an empty string if the handle is invalid or end of file is reached.
Technical Exegesis...
Reads a string from the file in a length-prefixed format: first reads a 4-byte integer length, then reads that many bytes as the string content. Returns an empty string if the handle is invalid or end of file is reached.
The string format expects a 4-byte length header followed by the string data. This matches the format written by fileWriteString. Does not include null terminator in the stored format.