One Logo Pool Ball
TabularData · IOS API REFERENCE

CSVWritingOptions

struct · iOS 15.0+ · SDK 27.1

struct CSVWritingOptions

A set of CSV file-writing options.

Members (18)

get · iOS 15.0+

dateFormat

TypeScript
get dateFormat(): (string) | null
Swift declaration
var dateFormat: String?

The format the CSV file generator uses to create date strings. Defaults to `nil`, which uses ISO 8601 encoding.

set · iOS 15.0+

dateFormat

TypeScript
set dateFormat(value: (string) | null)
Swift declaration
var dateFormat: String?

The format the CSV file generator uses to create date strings. Defaults to `nil`, which uses ISO 8601 encoding.

get · iOS 15.0+

nilEncoding

TypeScript
get nilEncoding(): string
Swift declaration
var nilEncoding: String

The string the CSV file generator uses to represent nil values. Defaults to an empty string.

set · iOS 15.0+

nilEncoding

TypeScript
set nilEncoding(value: string)
Swift declaration
var nilEncoding: String

The string the CSV file generator uses to represent nil values. Defaults to an empty string.

get · iOS 15.0+

trueEncoding

TypeScript
get trueEncoding(): string
Swift declaration
var trueEncoding: String

The string the CSV file generator uses to represent true Boolean values. Defaults to `true`.

set · iOS 15.0+

trueEncoding

TypeScript
set trueEncoding(value: string)
Swift declaration
var trueEncoding: String

The string the CSV file generator uses to represent true Boolean values. Defaults to `true`.

get · iOS 15.4+

dateFormatter

TypeScript
get dateFormatter(): ((arg0: globalThis.Date) => Promise<string>)
Swift declaration
var dateFormatter: (Date) -> String { get set }

A closure that maps dates to their string representations. Defaults to ISO 8601 encoding.

get · iOS 15.0+

falseEncoding

TypeScript
get falseEncoding(): string
Swift declaration
var falseEncoding: String

The string the CSV file generator uses to represent false Boolean values. Defaults to `false`.

set · iOS 15.0+

falseEncoding

TypeScript
set falseEncoding(value: string)
Swift declaration
var falseEncoding: String

The string the CSV file generator uses to represent false Boolean values. Defaults to `false`.

init · iOS 15.0+

init

TypeScript
static initIncludesHeaderDateFormatNilEncodingTrueEncodingFalseEncodingNewlineDelimiter(includesHeader?: boolean, dateFormat?: (string) | null, nilEncoding?: string, trueEncoding?: string, falseEncoding?: string, newline?: string, delimiter?: string): CSVWritingOptions
Swift declaration
init(includesHeader: Bool = true, dateFormat: String?, nilEncoding: String = "", trueEncoding: String = "true", falseEncoding: String = "false", newline: String = "\n", delimiter: Character = ",")

Creates a set of options for writing a CSV file. - Parameters: - includesHeader: A Boolean value that indicates whether to write a header with the column names. Defaults to `true`. - dateFormatter: The format the CSV file generator uses to create date strings. - nilEncoding: The spelling for nil values. Defaults to an empty string. - trueEncoding: The spelling for true Boolean values. Defaults to `true`. - falseEncoding: The spelling for false Boolean values. Defaults to `false`. - newline: The newline sequence. Defaults to a line feed. - delimiter: The field delimiter. Defaults to comma (`,`).

init · iOS 15.0+

init

TypeScript
static initIncludesHeaderNilEncodingTrueEncodingFalseEncodingNewlineDelimiter(includesHeader?: boolean, nilEncoding?: string, trueEncoding?: string, falseEncoding?: string, newline?: string, delimiter?: string): CSVWritingOptions
Swift declaration
init(includesHeader: Bool = true, nilEncoding: String = "", trueEncoding: String = "true", falseEncoding: String = "false", newline: String = "\n", delimiter: Character = ",")

Creates a set of options for writing a CSV file. - Parameters: - includesHeader: A Boolean value that indicates whether to write a header with the column names. Defaults to `true`. - nilEncoding: The spelling for nil values. Defaults to an empty string. - trueEncoding: The spelling for true Boolean values. Defaults to `true`. - falseEncoding: The spelling for false Boolean values. Defaults to `false`. - newline: The newline sequence. Defaults to a line feed. - delimiter: The field delimiter. Defaults to comma (`,`).

get · iOS 15.0+

includesHeader

TypeScript
get includesHeader(): boolean
Swift declaration
var includesHeader: Bool

A Boolean value that indicates whether to write a header with the column names. Defaults to `true`.

set · iOS 15.0+

includesHeader

TypeScript
set includesHeader(value: boolean)
Swift declaration
var includesHeader: Bool

A Boolean value that indicates whether to write a header with the column names. Defaults to `true`.

get · iOS 15.0+

newline

TypeScript
get newline(): string
Swift declaration
var newline: String

The string the CSV file generator uses to represent a newline sequence. Defaults to a line feed.

set · iOS 15.0+

newline

TypeScript
set newline(value: string)
Swift declaration
var newline: String

The string the CSV file generator uses to represent a newline sequence. Defaults to a line feed.

get · iOS 15.0+

delimiter

TypeScript
get delimiter(): string
Swift declaration
var delimiter: Character

The character the CSV file generator uses to separate data fields in a CSV file. Defaults to comma (`,`).

set · iOS 15.0+

delimiter

TypeScript
set delimiter(value: string)
Swift declaration
var delimiter: Character

The character the CSV file generator uses to separate data fields in a CSV file. Defaults to comma (`,`).

init · iOS 15.0+

init

TypeScript
static init(): CSVWritingOptions
Swift declaration
init()

Creates the default set of options for writing a CSV file.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CSVWritingOptions.dateFormatter

closure property answers its caller

All TabularData types →