NilCodingStrategy
public enum NilCodingStrategy: Hashable
The encoding/decoding strategies used for nil
values in a CSV document.
-
A
nil
value is represented by an empty cell.Declaration
Swift
case blank
-
A
nil
value is represented byN/A
as a cell’s contents.Declaration
Swift
case na
-
A
nil
value is represented by a custom set of bytes.Declaration
Swift
case custom(_ bytes: [UInt8])
Parameters
bytes
The bytes that represent
nil
in the CSV document.
-
Gets the bytes that represent
nil
with the current strategy.Declaration
Swift
public func bytes() -> [UInt8]
Return Value
nil
, represented by a byte array. -
Checks to see if a given array of bytes represents
nil
with the current strategy.Declaration
Swift
public func isNull(_ bytes: [UInt8]) -> Bool
Parameters
bytes
The bytes to match against the current strategy.
Return Value
A
Bool
indicating whether the bytes passed in representnil
or not.