Pattern
info.fingo.spata.text.StringParser.Pattern
Intermediary to delegate parsing to in order to infer type of formatter used by parser.
When adding parsing function to an entity, instead of providing
def parse[A, B](input: String, format: B)(using parser: FormattedStringParser[A, B]): ParseResult[A]
which requires then to use it as
entity.parse[Double, NumberFormat]("123,45", numberFormat)
one can provide function to get this Pattern
def parse[A]: Pattern[A]
and use it with nicer syntax
entity.parse[Double]("123,45", numberFormat)
Type parameters
- A
-
target type for parsing
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article