final case class IttoCSVFormat(delimeter: Char, quote: Char, recordSeparator: String, quoteEmpty: Boolean, forceQuote: Boolean, printHeader: Boolean, trim: Boolean, ignoreEmptyLines: Boolean, quoteLowerChar: Boolean) extends Product with Serializable
The formatter determines how CSV will be generated, two formatters are available:
Method | Description | Default Formatter | Tab formatter |
|---|---|---|---|
withDelimiter(c: Char) | the separator between fields | , | \t |
withQuote(c: Char) | the quoteChar character | " | " |
withQuoteEmpty(c: Boolean) | quotes field if empty | false | false |
withForceQuote(c: Boolean) | quotes all fields | false | false |
withPrintHeader(c: Boolean) | if true prints the header | false | false |
withTrim(c: Boolean) | trims the field | false | false |
withRecordSeparator(c: String) | the rows separator | \r\n | \r\n |
it's possible to create custom foramtters editing the default ones, example:
implicit val newFormatter = default.withForceQuote(true).withRecordSeparator("\n").with.....
- delimeter
the separator between fields
- quote
the quoteChar character
- recordSeparator
the record separator
- quoteEmpty
if true quotes the empty field
- forceQuote
if true quotes all fields
- printHeader
if true prints the header
- trim
if true trims the fields
- ignoreEmptyLines
if true skip empty lines
- quoteLowerChar
if true quotes lower chars
- Since
0.0.1
- See also
See test code for more information
See https://github.com/gekomad/itto-csv/blob/master/README.md for more information.
- Alphabetic
- By Inheritance
- IttoCSVFormat
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new IttoCSVFormat(delimeter: Char, quote: Char, recordSeparator: String, quoteEmpty: Boolean, forceQuote: Boolean, printHeader: Boolean, trim: Boolean, ignoreEmptyLines: Boolean, quoteLowerChar: Boolean)
- delimeter
the separator between fields
- quote
the quoteChar character
- recordSeparator
the record separator
- quoteEmpty
if true quotes the empty field
- forceQuote
if true quotes all fields
- printHeader
if true prints the header
- trim
if true trims the fields
- ignoreEmptyLines
if true skip empty lines
- quoteLowerChar
if true quotes lower chars
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val delimeter: Char
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val forceQuote: Boolean
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val ignoreEmptyLines: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val printHeader: Boolean
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val quote: Char
- val quoteEmpty: Boolean
- val quoteLowerChar: Boolean
- val recordSeparator: String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val trim: Boolean
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withDelimiter(c: Char): IttoCSVFormat
- def withForceQuote(c: Boolean): IttoCSVFormat
- def withIgnoreEmptyLines(c: Boolean): IttoCSVFormat
- def withPrintHeader(c: Boolean): IttoCSVFormat
- def withQuote(c: Char): IttoCSVFormat
- def withQuoteEmpty(c: Boolean): IttoCSVFormat
- def withQuoteLowerChar(c: Boolean): IttoCSVFormat
- def withRecordSeparator(c: String): IttoCSVFormat
- def withTrim(c: Boolean): IttoCSVFormat