如何将 Int 值转换为 String?

时间:2021-04-27 16:38:18

标签: string type-conversion integer elm

如何将 Int 值转换为 String

1 个答案:

答案 0 :(得分:2)

Elm 使用 String.fromInt 使这一切变得非常容易。

例如

String.fromInt 5 -- returns "5"

找到答案的一个很好的工具是elm-search。只需搜索 Int -> String 或任何其他类型的签名以获取类似问题。

相关问题