【问题标题】:How to concatenate to each string in an array in lua?如何连接到lua中数组中的每个字符串?
【发布时间】:2018-08-18 06:20:18
【问题描述】:

我需要将一个字符串连接到每个字符串数组。有一个更好的方法吗? (一些矢量化或内置方法?)

for i=1,10 do
    stringList[i] = stringList[i] .. "NewHotness"
end

谢谢!

【问题讨论】:

    标签: arrays string lua concatenation


    【解决方案1】:

    没有内置的方法可以做到这一点。你的解决方案很好。

    【讨论】:

      猜你喜欢
      • 2020-03-25
      • 2023-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-07
      • 2020-09-04
      相关资源
      最近更新 更多