I was wondering if the simplest and most readable text file in an array of strings is in the quick version.
Text file:
line 1 line 2 line 3 line 4
To an array like this:
var array = ["line 1","line 2","line 3","line 4"]
I would also like to know how to do similar in structure as follows:
Struct struct{ var name: String! var email: String! }
so take a text file and put it in a structure in an array.
Thanks for the help!
source share