-
Notifications
You must be signed in to change notification settings - Fork 0
Signed
Giuseppe Cannella edited this page Feb 19, 2020
·
2 revisions
Type name | example |
---|---|
Signed | -42 |
import com.github.gekomad.regexcollection.Signed
import com.github.gekomad.regexcollection.Validate.validate
assert(validate[Signed]("99.99") == None)
assert(validate[Signed]("0") == Some("0"))
assert(validate[Signed]("11111111111111111111111110") == Some("11111111111111111111111110"))
assert(validate[Signed]("99") == Some("99"))
assert(validate[Signed]("+99") == Some("+99"))
assert(validate[Signed]("-99") == Some("-99"))
assert(validate[Signed]("4294967295") == Some("4294967295"))
assert(validate[Signed]("4294967296") == Some("4294967296"))
assert(validate[Signed](".99") == None)
assert(validate[Signed]("-1") == Some("-1"))