ReadString

This function reads a null-terminated string from a stream.

Syntax

Parameters

Returns

Returns a string read from the stream.

Example

#include "Leadwerks.h"

using namespace Leadwerks;

int main(int argc, const char *argv[])
{
std::string path = "MyFile.dat";

Stream* stream = FileSystem::WriteFile(path);
if (stream==NULL) Debug::Error("Failed to write file.");

stream->WriteString("Hello!");
stream->Seek(0);
System::Print(stream->ReadString());

stream->Release();

return 0;
}