📌  相关文章
📜  字符串数组到字符串 golang - Go 编程语言 - Go 编程语言代码示例

📅  最后修改于: 2022-03-11 14:45:01.877000             🧑  作者: Mango

代码示例1
str1 := []string{"the","cat","in","the","hat"}
fmt.Println(str1)
 
str2 := strings.Join(str1, " ")
fmt.Println(str2)
 
str3 := strings.Join(str1, ", ")
fmt.Println(str3)
 
Output:
[the cat in the hat]
the cat in the hat
the, cat, in, the, hat