-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds function to read a string from a file
- Loading branch information
Showing
4 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// @return String that represents all the text inside the file | ||
/// | ||
/// @param filename File to parse | ||
/// | ||
/// @jujuadams 2020-08-16 | ||
|
||
function string_from_file(_filename) | ||
{ | ||
var _buffer = buffer_load(_filename); | ||
var _string = buffer_read(_buffer, buffer_string); | ||
buffer_delete(_buffer); | ||
return _string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"isDnD": false, | ||
"isCompatibility": false, | ||
"parent": { | ||
"name": "Struct N' Array Parser", | ||
"path": "folders/Struct N' Array Parser.yy", | ||
}, | ||
"resourceVersion": "1.0", | ||
"name": "string_from_file", | ||
"tags": [], | ||
"resourceType": "GMScript", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters