WriteLine
This function writes a string to a stream, and adds the line return character at the end.
Syntax
- void WriteLine(const std::string& s)
Parameters
- s: the line of text to write.
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;
}