Skip to content

Commit 04692d8

Browse files
committed
Merge pull request #98238 from timothyqiu/not-append
Fix wording in description of `store_line` and `store_string`
2 parents 324659f + e7e0e65 commit 04692d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/classes/FileAccess.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@
474474
<return type="void" />
475475
<param index="0" name="line" type="String" />
476476
<description>
477-
Appends [param line] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8.
477+
Stores [param line] in the file followed by a newline character ([code]\n[/code]), encoding the text as UTF-8.
478478
</description>
479479
</method>
480480
<method name="store_pascal_string">
@@ -496,7 +496,7 @@
496496
<return type="void" />
497497
<param index="0" name="string" type="String" />
498498
<description>
499-
Appends [param string] to the file without a line return, encoding the text as UTF-8.
499+
Stores [param string] in the file without a newline character ([code]\n[/code]), encoding the text as UTF-8.
500500
[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].
501501
</description>
502502
</method>

0 commit comments

Comments
 (0)