ReadLine

This function reads a line of text from a stream. A line is terminated when either the end-of-line or null character are reached.

Syntax

Returns

Returns a line of text 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->WriteLine("Hello!");
stream->Seek(0);
System::Print(stream->ReadLine());

stream->Release();

return 0;
}