- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
USD Currency
        Giuseppe Cannella edited this page Jan 10, 2019 
        ·
        1 revision
      
    | Type name | example | 
|---|---|
| UsdCurrency | $1.00 | 
import com.github.gekomad.regexcollection.Validate.valida
import com.github.gekomad.regexcollection.UsdCurrency
assert(validate[UsdCurrency]("$150000000.00") == Some("$150000000.00"))
assert(validate[UsdCurrency]("$1.00") == Some("$1.00"))
assert(validate[UsdCurrency]("15.00") == Some("15.00"))
assert(validate[UsdCurrency]("-150.00") == Some("-150.00"))
assert(validate[UsdCurrency]("1500.00") == Some("1500.00"))
assert(validate[UsdCurrency]("1,500.00") == Some("1,500.00"))
assert(validate[UsdCurrency]("$0.20") == Some("$0.20"))
assert(validate[UsdCurrency]("$-1213,120.00") == Some("$-1213,120.00"))
assert(validate[UsdCurrency]("25:00") == None)