Skip to content

3.05 Parse CSV to a CollSeq

Boris Shilov edited this page Jun 21, 2019 · 3 revisions

Parse CSV to a CollSeq

import com.github.marklister.collections.io._
val data = new java.io.StringReader("""1, Jan\n 2, Feb""")

CsvParser[Int,String].parse(data)
res2: com.github.marklister.collections.immutable.CollSeq2[Int,String] =
CollSeq((1, Jan),
        (2, Feb))