-5
從.txt文件中,我得到了充滿引號的字符串,這些字符在代碼中使用當然很糟糕。例如刪除引號 - 斯威夫特
3820,"20170217",8,752,119,"Rh",,"fr",,,,"iC1.2","iC1.2",,"IS6a","Z",,0,"IS6a",,201702161517,"-"
3821,"20170227",2,753,207,"Dd","Kru","sc",,,,"iB8","iB8",,"IS9b","Z",,2097152,"IS9b",,201702270804,"+~-"
3822,"20170227",3,753,8,"Dd",,"phH_1",,,,"iB8",,,"IS12~IT12","Z",,2097153,"IS12~IT12",C,201702270804,"-"
3823,"20170227",4,753,29,"Dd",,"phH_1",,,,"iB8",,,"IS11~IT11","Z",,2097153,"IS11~IT11",C,201702270804,"-"
我怎麼能最好的擺脫這些引號? 在此先感謝
請給出一些上下文。你是否試圖將上面的代碼粘貼到Swift源文件中? – JeremyP
我正在嘗試使用所有這些字符串創建一個數組,以便以後在分析中使用。但是當把它放在一個數組中時,引號將一切都弄亂了。 –
相關:http://stackoverflow.com/questions/42487486/making-text-into-an-array-swift,http://stackoverflow.com/questions/42484311/swift-split-string-to-array-with -exclusion。 –