getCsvLine(delim:)

    Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter delim to use other than the default "," (comma). This delimiter must be one-character long, and cannot be a double quotation mark.

    FileAccess.swift:817
    final func getCsvLine(delim: String = ",") -> PackedStringArray

    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:

    Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it could very well use quotes, it was only written without for demonstration purposes. The third line must use "" for each quotation mark that needs to be interpreted as such instead of the end of a text value.

    Other members in extension

    Types

    Type members

    Instance members