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

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

package com.github.doyaaaaaken.kotlincsv.dsl

import com.github.doyaaaaaken.kotlincsv.client.CsvReader
import com.github.doyaaaaaken.kotlincsv.dsl.context.CsvReaderContext

/**
 * DSL Method which provides `CsvReader`
 *
 * @return CsvReader
 *
 * Usage example:
 *
 * 1. Use default setting
 *  
 *  val reader: CsvReader = csvReader()
 *  reader.read("a,b,c\nd,e,f))
 *  
* * 2. Customize Setting *
 *  val reader: CsvReader = csvReader {
 *      delimiter = '\t'
 *      //...
 *  }
 *  
* * @see CsvReaderContext * @see CsvReader * * @author doyaaaaaken */ fun csvReader(init: CsvReaderContext.() -> Unit = {}): CsvReader { val context = CsvReaderContext().apply(init) return CsvReader(context) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy