stringParser

info.fingo.spata.text.StringParser$.stringParser$
object stringParser extends StringParser[String]

No-op parser for strings.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(str: String): String

Parses string to desired type.

Parses string to desired type.

If parsing fails this function should report error by throwing exception. This is further handled by parse to allow for exception-free, functional code.

Value parameters

str

the input string

Attributes

Returns

parsed value

Throws
RuntimeException

if text cannot be parsed to requested type

Note

This function assumes "standard" string formatting, e.g. point as decimal separator or ISO date and time formats, without any locale support. Use FormattedStringParser if more control over source format is required.