All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.github.doyaaaaaken.kotlincsv.dsl.CsvWriterDsl.kt Maven / Gradle / Ivy

package com.github.doyaaaaaken.kotlincsv.dsl

import com.github.doyaaaaaken.kotlincsv.client.CsvWriter
import com.github.doyaaaaaken.kotlincsv.dsl.context.CsvWriterContext

/**
 * DSL Method which provides `CsvWriter`
 *
 * @return CsvWriter
 *
 * Usage example:
 *
 * 1. Use default setting
 *  
 *  val writer: CsvWriter = csvWriter()
 *  
* * 2. Customize Setting *
 *  val writer: CsvWriter = csvWriter {
 *      charset = Charsets.ISO_8859_1
 *      //...
 *  }
 *  
* * @see CsvWriterContext * @see CsvWriter * * @author doyaaaaaken */ fun csvWriter(init: CsvWriterContext.() -> Unit = {}): CsvWriter { val context = CsvWriterContext().apply(init) return CsvWriter(context) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy