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

字串插值

Created: November-22, 2018

iex(1)> name = "John"
"John"
iex(2)> greeting = "Hello, #{name}"
"Hello, John"
iex(3)> num = 15
15
iex(4)> results = "#{num} item(s) found."
"15 item(s) found."
  • 檢查 String 是否包含 Substring
  • 拆分一個字串

Copyright © 2018. All right reserved

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

  • 關於本站
  • 免責聲明