val parser = PeselParser()
val result = parser.parse("64092555585"): PeselResult -> Validation<PeselParseFailure, Pesel>
result.fold<T>({ error ->
error.description
}, { pesel ->
pesel.toString()
}): String
result.getOrElseGet { throw RuntimeException(it.description()) }: Pesel
result.toOption(): Option<Pesel>
result.orNull(): Pesel?
result.get(): Pesel // if invalid throw NoSuchElementException
-
Notifications
You must be signed in to change notification settings - Fork 0
crejk/pesel-parser
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
PESEL parser