小编Gre*_*reg的帖子

将数据附加到Swift 3中的txt文件

基本上,我试图用Swift 3做到这一点:

write a titleString to file
For i=1 to n
    newString = createNewString()  //these may look like "1: a, b, c"
    append each new string to end of file
next i
Run Code Online (Sandbox Code Playgroud)

这是我做的:

let fileURL = URL(fileURLWithPath: completePath)
let titleString = "Line, Item 1, Item 2, Item 3"
var dataString: String
let list1 = [1, 2, 3, 4, 5]
let list2 = ["a", "b", "c", "d", "e"]
let list3 = ["p", "q", "r", "s", "t"]


for i in 0...4 { …
Run Code Online (Sandbox Code Playgroud)

csv text append ios swift3

6
推荐指数
1
解决办法
4781
查看次数

标签 统计

append ×1

csv ×1

ios ×1

swift3 ×1

text ×1