CsvRowReadingOps

kantan.csv.ops.CsvRowReadingOps
final class CsvRowReadingOps[A](a: A)(implicit evidence$1: CsvSource[A])

Provides syntax for decoding a string as a CSV row.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def readCsvRow[B : RowDecoder](conf: CsvConfiguration)(implicit evidence$1: RowDecoder[B], e: ReaderEngine): ReadResult[B]

Parses a string as a single CSV row.

Parses a string as a single CSV row.

Attributes

Example
scala> import kantan.csv._
scala> "1,2,3".readCsvRow[(Int, Int, Int)](rfc)
res0: ReadResult[(Int, Int, Int)] = Right((1,2,3))
def unsafeReadCsvRow[B : RowDecoder](conf: CsvConfiguration)(implicit evidence$1: RowDecoder[B], e: ReaderEngine): B

Parses a string as a single CSV row.

Parses a string as a single CSV row.

Attributes

Example
scala> import kantan.csv._
scala> "1,2,3".unsafeReadCsvRow[(Int, Int, Int)](rfc)
res0: (Int, Int, Int) = (1,2,3)

Note that this method is unsafe and will throw an exception if the string value is not a valid A. Prefer readCsvRow whenever possible.