xcode - Reading file line by line in iOS SDK -


i have texfile follows:

line1 line2 line3 line4 line5  .... 

i want read file 2 arrays of string line1, line3, line 5,... go array1 , line 2, line 4, line 6,... go array2. each element of arrays stores 1 line.

step 1) read file ([nsstring stringwithcontentsoffile:encoding:error:] )

step 2) split string ([nsstring componentsseparatedbycharactersinset:[nscharacterset newlinecharacterset]] )

step 3) iterate on array , insert 2 arrays


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -