dateParsers
TypeScriptget dateParsers(): Array<((arg0: string) => Promise<(globalThis.Date) | null>)>Swift declarationvar dateParsers: [(String) -> Date?]An array of closures that parse a date from a string.
struct · iOS 15.0+ · SDK 27.1
struct CSVReadingOptionsA set of CSV file-reading options.
get dateParsers(): Array<((arg0: string) => Promise<(globalThis.Date) | null>)>Swift declarationvar dateParsers: [(String) -> Date?]An array of closures that parse a date from a string.
set dateParsers(value: Array<((arg0: string) => (globalThis.Date) | null)>)Swift declarationvar dateParsers: [(String) -> Date?]An array of closures that parse a date from a string.
get usesQuoting(): booleanSwift declarationvar usesQuoting: BoolA Boolean value that indicates whether to enable quoting. When `true`, the contents of a quoted field can contain special characters, such as the field delimiter and newlines. Defaults to `true`.
set usesQuoting(value: boolean)Swift declarationvar usesQuoting: BoolA Boolean value that indicates whether to enable quoting. When `true`, the contents of a quoted field can contain special characters, such as the field delimiter and newlines. Defaults to `true`.
static init(hasHeaderRow?: boolean, nilEncodings?: Array<string>, trueEncodings?: Array<string>, falseEncodings?: Array<string>, floatingPointType?: CSVType, ignoresEmptyLines?: boolean, usesQuoting?: boolean, usesEscaping?: boolean, delimiter?: string, escapeCharacter?: string): CSVReadingOptionsSwift declarationinit(hasHeaderRow: Bool = true, nilEncodings: Set<String> = ["", "#N/A", "#N/A N/A", "#NA", "N/A", "NA", "NULL", "n/a", "nil", "null"], trueEncodings: Set<String> = ["1", "True", "TRUE", "true"], falseEncodings: Set<String> = ["0", "False", "FALSE", "false"], floatingPointType: CSVType = .double, ignoresEmptyLines: Bool = true, usesQuoting: Bool = true, usesEscaping: Bool = false, delimiter: Character = Character(","), escapeCharacter: Character = Character("\\"))Creates a set of options for reading a CSV file. - Parameters: - hasHeaderRow: A Boolean value that indicates whether the CSV file has a header row. Defaults to `true`. - nilEncodings: A list of recognized encodings of `nil`. Defaults to `["", "#N/A", "#N/A N/A", "#NA", "N/A", "NA", "NULL", "n/a", "null"]`. - trueEncodings: A list of acceptable encodings of `true`. Defaults to `["1", "True", "TRUE", "true"]`. - falseEncodings: A list of acceptable encodings of `false`. Defaults to `["0", "False", "FALSE", "false"]`. - floatingPointType: A type to use for floating-point numeric values (either ``CSVType/double`` or ``CSVType/float``). Defaults to ``CSVType/double``. - ignoresEmptyLines: A Boolean value that indicates whether to ignore empty lines. Defaults to `true.` - usesQuoting: A Boolean value that indicates whether the CSV file uses quoting. Defaults to `true`. - usesEscaping: A Boolean value that indicates whether the CSV file uses escaping sequences. Defaults to `false`. - delimiter: A field delimiter. Defaults to comma (`,`). - escapeCharacter: An escape character to use if ``usesEscaping`` is true. Defaults to backslash (`\`).
get hasHeaderRow(): booleanSwift declarationvar hasHeaderRow: BoolA Boolean value that indicates whether the CSV file has a header row. Defaults to `true`.
set hasHeaderRow(value: boolean)Swift declarationvar hasHeaderRow: BoolA Boolean value that indicates whether the CSV file has a header row. Defaults to `true`.
get nilEncodings(): Array<string>Swift declarationvar nilEncodings: Set<String>The set of strings that stores acceptable spellings for empty values. Defaults to `["", "#N/A", "#N/A N/A", "#NA", "N/A", "NA", "NULL", "n/a", "null"]`.
set nilEncodings(value: Array<string>)Swift declarationvar nilEncodings: Set<String>The set of strings that stores acceptable spellings for empty values. Defaults to `["", "#N/A", "#N/A N/A", "#NA", "N/A", "NA", "NULL", "n/a", "null"]`.
get usesEscaping(): booleanSwift declarationvar usesEscaping: BoolA Boolean value that indicates whether to enable escaping. When `true`, you can escape special characters, such as the field delimiter, by prefixing them with the escape character, which is the backslash (`\`) by default. Defaults to `false`.
set usesEscaping(value: boolean)Swift declarationvar usesEscaping: BoolA Boolean value that indicates whether to enable escaping. When `true`, you can escape special characters, such as the field delimiter, by prefixing them with the escape character, which is the backslash (`\`) by default. Defaults to `false`.
get trueEncodings(): Array<string>Swift declarationvar trueEncodings: Set<String>The set of strings that stores acceptable spellings for true Boolean values. Defaults to `["1", "True", "TRUE", "true"]`.
set trueEncodings(value: Array<string>)Swift declarationvar trueEncodings: Set<String>The set of strings that stores acceptable spellings for true Boolean values. Defaults to `["1", "True", "TRUE", "true"]`.
get falseEncodings(): Array<string>Swift declarationvar falseEncodings: Set<String>The set of strings that stores acceptable spellings for false Boolean values. Defaults to `["0", "False", "FALSE", "false"]`.
set falseEncodings(value: Array<string>)Swift declarationvar falseEncodings: Set<String>The set of strings that stores acceptable spellings for false Boolean values. Defaults to `["0", "False", "FALSE", "false"]`.
get escapeCharacter(): stringSwift declarationvar escapeCharacter: Character { get }The character that precedes other characters, such as quotation marks, so that the parser interprets them as literal characters instead of special ones. Defaults to backslash(`\`).
get floatingPointType(): CSVTypeSwift declarationvar floatingPointType: CSVTypeThe type to use for floating-point numeric values. Defaults to ``CSVType/double``.
set floatingPointType(value: CSVType)Swift declarationvar floatingPointType: CSVTypeThe type to use for floating-point numeric values. Defaults to ``CSVType/double``.
get ignoresEmptyLines(): booleanSwift declarationvar ignoresEmptyLines: BoolA Boolean value that indicates whether to ignore empty lines. Defaults to `true`.
set ignoresEmptyLines(value: boolean)Swift declarationvar ignoresEmptyLines: BoolA Boolean value that indicates whether to ignore empty lines. Defaults to `true`.
get delimiter(): stringSwift declarationvar delimiter: Character { get }The character that separates data fields in a CSV file, typically a comma. Defaults to comma (`,`).
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
CSVReadingOptions.addDateParseStrategy(_:)
This declaration needs Swift generic type arguments. (no canonical witness for T)