Skip to content

Latest commit

 

History

History
55 lines (55 loc) · 670 Bytes

README.md

File metadata and controls

55 lines (55 loc) · 670 Bytes

字符串转数组

swift

let str = "I am FlyElephant"
let array = str.components(separatedBy:" ")
print("字符串转数组:\(array)")

objective-c

// todo

python

# todo

go

// todo

kotlin

// todo

dart

// todo

数组转字符串:

swift

let data = [1, 2, 3, 4, 5]
let dataStr = data.map(String.init)
let result = dataStr.joined(separator: ",")
print("数组转字符串:\(result)")

objective-c

// todo

python

# todo

go

// todo

kotlin

// todo

dart

// todo