Pixel-Composer/scripts/text_file/text_file.gml
Tanasart 2b1edf0457 lua
2023-01-04 08:30:04 +07:00

19 lines
398 B
Plaintext

function file_text_read_all(file) {
var s = "";
while(!file_text_eof(file))
s += file_text_readln(file);
return s;
}
function file_text_read_all_lines(file) {
var s = [];
while(!file_text_eof(file))
array_push(s, file_text_readln(file));
return s;
}
function file_text_write_all(file, str) {
var f = file_text_open_write(file);
file_text_write_string(f, str);
file_text_close(f);
}