How to convert Int to String?

6,432 views
Skip to first unread message

Stefan Geneshky

unread,
Aug 23, 2015, 5:48:38 PM8/23/15
to Elm Discuss
Hello everyone,

The String lib doesn't seem to convert Int to String and Float to String.
How are these conversions done in Elm?

Thanks,
Stefan

Joey Eremondi

unread,
Aug 23, 2015, 5:53:42 PM8/23/15
to elm-d...@googlegroups.com
In Basics (imported by default), there's a toString method which will convert anything into a string. This works nicely for simple values like integers, or if you need a quick-and-dirty representation of more complicated data.

--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefan Geneshky

unread,
Aug 24, 2015, 1:21:06 AM8/24/15
to Elm Discuss
Thanks, Joey! That was easy.
Reply all
Reply to author
Forward
0 new messages