CharIsDigitTest
`Char.isDigit` is `True` for `'0'` and `'9'` and `False` for `'a'` and `'A'`.
Results
elm-0.19.1
passran in 86 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. digit1: True digit2: True digit3: False digit4: False
elm-0.19.2
passran in 74 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. digit1: True digit2: True digit3: False digit4: False
elm-0.19.3
passran in 45 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. digit1: True digit2: True digit3: False digit4: False
lamdera-1.5.0
passran in 64 msOutput
digit1: True digit2: True digit3: False digit4: False
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/CharIsDigitTest] in its title.
Source
The -- CHECK: lines give the expected output.
module CharIsDigitTest exposing (main)
{-| `Char.isDigit` is `True` for `'0'` and `'9'` and `False` for `'a'` and `'A'`.
-}
-- CHECK: digit1: True
-- CHECK: digit2: True
-- CHECK: digit3: False
-- CHECK: digit4: False
import Char
import Html exposing (text)
main =
let
_ = Debug.log "digit1" (Char.isDigit '0')
_ = Debug.log "digit2" (Char.isDigit '9')
_ = Debug.log "digit3" (Char.isDigit 'a')
_ = Debug.log "digit4" (Char.isDigit 'A')
in
text "done"