summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/File.xml11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index de3beedf0f..6622619fb3 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -119,8 +119,15 @@
<return type="PackedStringArray" />
<argument index="0" name="delim" type="String" default="&quot;,&quot;" />
<description>
- Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long.
- Text is interpreted as being UTF-8 encoded.
+ Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark.
+ Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence.
+ For example, the following CSV lines are valid and will be properly parsed as two strings each:
+ [codeblock]
+ Alice,"Hello, Bob!"
+ Bob,Alice! What a surprise!
+ Alice,"I thought you'd reply with ""Hello, world""."
+ [/codeblock]
+ Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it [i]could[/i] very well use quotes, it was only written without for demonstration purposes. The third line must use [code]""[/code] for each quotation mark that needs to be interpreted as such instead of the end of a text value.
</description>
</method>
<method name="get_double" qualifiers="const">