标签: ruby regex text-processing
我有一个像这样的数组
text_arr = ["hello","how","are","you"]
我希望将其转换为像这样的字符串
text = "hello how are you"
我如何用Ruby做到这一点?
答案 0 :(得分:3)
试试这个
text = text_arr.join(' ')