StringWordsLinesTest
`String.words` splits `"hello world"` at the space and `String.lines` splits `"line1\nline2"` at the newline, each into two parts.
Results
elm-0.19.1
passran in 36 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. words1: ["hello","world"] lines1: ["line1","line2"]
elm-0.19.2
passran in 56 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. words1: ["hello","world"] lines1: ["line1","line2"]
elm-0.19.3
passran in 60 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. words1: ["hello","world"] lines1: ["line1","line2"]
lamdera-1.5.0
passran in 64 msOutput
words1: ["hello","world"] lines1: ["line1","line2"]
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/StringWordsLinesTest] in its title.
Source
The -- CHECK: lines give the expected output.
module StringWordsLinesTest exposing (main)
{-| `String.words` splits `"hello world"` at the space and `String.lines`
splits `"line1\nline2"` at the newline, each into two parts.
-}
-- CHECK: words1: ["hello","world"]
-- CHECK: lines1: ["line1","line2"]
import Html exposing (text)
main =
let
_ = Debug.log "words1" (String.words "hello world")
_ = Debug.log "lines1" (String.lines "line1\nline2")
in
text "done"