logo
  • 教程列表
  • SO官方文檔
  • 字串
    • 轉換為字串
    • 獲取子字串
    • 拆分一個字串
    • 字串插值
    • 檢查 String 是否包含 Substring
    • 加入字串
  1. StackOverflow 文件
  2. Elixir Language 教程
  3. 字串
  4. 轉換為字串

轉換為字串

Created: November-22, 2018

使用 Kernel.inspect 將任何內容轉換為字串。

iex> Kernel.inspect(1)
"1"
iex> Kernel.inspect(4.2)
"4.2"
iex> Kernel.inspect %{pi: 3.14, name: "Yos"}
"%{pi: 3.14, name: \"Yos\"}"
  • 獲取子字串
  • 字串

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明