Skip to content

Number1

Giuseppe Cannella edited this page Feb 19, 2020 · 2 revisions
Type name example
Number1 99.99
import com.github.gekomad.regexcollection.Number1
import com.github.gekomad.regexcollection.Validate.validate

assert(validate[Number1]("99.99") == Some("99.99"))
assert(validate[Number1]("1.1") == Some("1.1"))
assert(validate[Number1]("99") == Some("99"))
assert(validate[Number1]("99.123") == None)
assert(validate[Number1]("991.11") == None)
assert(validate[Number1](".99") == Some(".99"))
assert(validate[Number1]("-1") == None)
assert(validate[Number1]("-1.33") == None)
Clone this wiki locally