Move the global public variable to be a member of the class

This commit is contained in:
Yasuhiro Hatta 2017-09-23 18:01:10 +09:00
parent e268fa3f3a
commit 4c4a5202fa
2 changed files with 7 additions and 5 deletions

View File

@ -15,11 +15,6 @@ internal let DQUOTE: UnicodeScalar = "\""
internal let DQUOTE_STR: String = "\""
internal let DQUOTE2_STR: String = "\"\""
public let defaultHasHeaderRow = false
public let defaultTrimFields = false
public let defaultDelimiter: UnicodeScalar = ","
public let defaultWhitespaces = CharacterSet.whitespaces
/// No overview available.
public class CSVReader {
@ -89,6 +84,11 @@ public class CSVReader {
extension CSVReader {
public static let defaultHasHeaderRow: Bool = false
public static let defaultTrimFields: Bool = false
public static let defaultDelimiter: UnicodeScalar = ","
public static let defaultWhitespaces: CharacterSet = .whitespaces
/// Create an instance with `InputStream`.
///
/// - parameter stream: An `InputStream` object. If the stream is not open,

View File

@ -69,6 +69,8 @@ public class CSVWriter {
extension CSVWriter {
public static let defaultDelimiter: UnicodeScalar = ","
public convenience init(
stream: OutputStream,
delimiter: String = String(defaultDelimiter),