<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/CSVReadingOptions",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData17CSVReadingOptionsV"
  },
  "title" : "CSVReadingOptions"
}
-->

# CSVReadingOptions

A set of CSV file-reading options.

```
struct CSVReadingOptions
```

## Topics

### Initializers

[`init(hasHeaderRow: Bool, nilEncodings: Set<String>, trueEncodings: Set<String>, falseEncodings: Set<String>, floatingPointType: CSVType, ignoresEmptyLines: Bool, usesQuoting: Bool, usesEscaping: Bool, delimiter: Character, escapeCharacter: Character)`](/documentation/TabularData/CSVReadingOptions/init(hasHeaderRow:nilEncodings:trueEncodings:falseEncodings:floatingPointType:ignoresEmptyLines:usesQuoting:usesEscaping:delimiter:escapeCharacter:))

Creates a set of options for reading a CSV file.

### Instance Properties

[`var dateParsers: [(String) -> Date?]`](/documentation/TabularData/CSVReadingOptions/dateParsers)

An array of closures that parse a date from a string.

[`var delimiter: Character`](/documentation/TabularData/CSVReadingOptions/delimiter)

The character that separates data fields in a CSV file, typically a comma.

[`var escapeCharacter: Character`](/documentation/TabularData/CSVReadingOptions/escapeCharacter)

The character that precedes other characters, such as quotation marks,
so that the parser interprets them as literal characters instead of special ones.

[`var falseEncodings: Set<String>`](/documentation/TabularData/CSVReadingOptions/falseEncodings)

The set of strings that stores acceptable spellings for false Boolean values.

[`var floatingPointType: CSVType`](/documentation/TabularData/CSVReadingOptions/floatingPointType)

The type to use for floating-point numeric values.

[`var hasHeaderRow: Bool`](/documentation/TabularData/CSVReadingOptions/hasHeaderRow)

A Boolean value that indicates whether the CSV file has a header row.

[`var ignoresEmptyLines: Bool`](/documentation/TabularData/CSVReadingOptions/ignoresEmptyLines)

A Boolean value that indicates whether to ignore empty lines.

[`var nilEncodings: Set<String>`](/documentation/TabularData/CSVReadingOptions/nilEncodings)

The set of strings that stores acceptable spellings for empty values.

[`var trueEncodings: Set<String>`](/documentation/TabularData/CSVReadingOptions/trueEncodings)

The set of strings that stores acceptable spellings for true Boolean values.

[`var usesEscaping: Bool`](/documentation/TabularData/CSVReadingOptions/usesEscaping)

A Boolean value that indicates whether to enable escaping.

[`var usesQuoting: Bool`](/documentation/TabularData/CSVReadingOptions/usesQuoting)

A Boolean value that indicates whether to enable quoting.

### Instance Methods

[`func addDateParseStrategy<T>(T)`](/documentation/TabularData/CSVReadingOptions/addDateParseStrategy(_:))

Adds a date parsing strategy.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)