Skip to content

Commit

Permalink
Merge pull request godotengine#98238 from timothyqiu/not-append
Browse files Browse the repository at this point in the history
Fix wording in description of `store_line` and `store_string`
  • Loading branch information
Repiteo committed Oct 16, 2024
2 parents 324659f + e7e0e65 commit 04692d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/classes/FileAccess.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
<return type="void" />
<param index="0" name="line" type="String" />
<description>
Appends [param line] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8.
Stores [param line] in the file followed by a newline character ([code]\n[/code]), encoding the text as UTF-8.
</description>
</method>
<method name="store_pascal_string">
Expand All @@ -496,7 +496,7 @@
<return type="void" />
<param index="0" name="string" type="String" />
<description>
Appends [param string] to the file without a line return, encoding the text as UTF-8.
Stores [param string] in the file without a newline character ([code]\n[/code]), encoding the text as UTF-8.
[b]Note:[/b] This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use [code]get_buffer(length).get_string_from_utf8()[/code] (if you know the length) or [method get_as_text].
</description>
</method>
Expand Down

0 comments on commit 04692d8

Please sign in to comment.