【问题标题】:How to convert an Int value to a String?如何将 Int 值转换为字符串?
【发布时间】:2021-04-27 16:38:18
【问题描述】:

如何将Int 值转换为String

【问题讨论】:

  • 请不要在标题中添加标签名称。这只是噪音。 (见stackoverflow.com/help/tagging
  • 同意,虽然链接底部有一个示例,其中包含以会话方式包含的编程语言,但我认为这仍然适用于此。
  • 不,它明确表示要避免使用[question title] in [tag] 形式。它没有增加任何价值,因为信息已经在标签中。

标签: string type-conversion integer elm


【解决方案1】:

Elm 使用 String.fromInt 让这一切变得非常简单。

例如

String.fromInt 5 -- returns "5"

elm-search 是寻找答案的好工具。只需搜索 Int -> String 或任何其他类型签名即可解决类似问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-11-12
    • 2018-05-08
    • 1970-01-01
    • 1970-01-01
    • 2022-06-27
    • 1970-01-01
    • 2016-08-17
    相关资源
    最近更新 更多