CsvRowDecoderOps

kantan.csv.ops.CsvRowDecoderOps
final class CsvRowDecoderOps(val ss: Seq[String])

Provides syntax for decoding CSV rows as values.

Importing kantan.csv.ops._ will add the following methods to Seq[String]:

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Decodes a CSV row as a value of type A.

Decodes a CSV row as a value of type A.

Attributes

Example
scala> Seq("1", "2", "3").decodeCsv[(Int, Int, Int)]
res0: kantan.csv.DecodeResult[(Int, Int, Int)] = Right((1,2,3))

Decodes a CSV row as a value of type A.

Decodes a CSV row as a value of type A.

Attributes

Example
scala> Seq("1", "2", "3").unsafeDecodeCsv[(Int, Int, Int)]
res0: (Int, Int, Int) = (1,2,3)

Note that this method is unsafe and will throw an exception if the row's value is not a valid A. Prefer decodeCsv whenever possible.

Concrete fields

val ss: Seq[String]