如何在 Swift 中連接或合併數組? - How do I concatenate or merge arrays in Swift?

問題:

If there are two arrays created in swift like this:如果像這樣在 swift 中創建了兩個數組:

var a:[CGFloat] = [1, 2, 3]
var b:[CGFloat] = [4, 5, 6]

How can they be merged to [1, 2, 3, 4, 5, 6] ?它們如何合併到[1, 2, 3, 4, 5, 6]


解決方案:

參考一: https://en.stackoom.com/question/1hVio
參考二: https://stackoom.com/question/1hVio
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章