Code: Pascal [Select][+][-]function WriteStringToFile(const filename, stringdata: string): boolean;var f: TextFile;begin Result := False; AssignFile(f, filename); try Rewrite(f); Write(f, stringdata); Result := True; finally CloseFile(f); end;end;
The is a function that will read a file into a string 'ReadFileToString'.Is there a WriteStringToFile? I can't find it but maybe it's called something else?
I don't know such a function also. But the implementation is really not complicated. Here is an example using TFileStream: