iphonetext file question

I have text file that with the following structure:

test2 \n

I can read it in array successfuly , but the line @/@/@/ is separator. I want to divide the NSArray to sub arrays at the separator.

Any suggestion how to solve that?

I also need to modify certain section.

Best regards

If you read it in as a NSString then

NSArray *chunks = [string componentsSeparatedByString: @"@/@/@/"];

Use componentsSeparatedByString method.You can store the value obtained in an Array.

Related Articles
  • I was trying out some c++ code while working with classes and this question occurred to me and it's bugging me a little. I have created a header file that contains my class definition and a cpp file that contains the implementation. If I use this cla
  • I recently asked How to produce plain binary from object files question on SO . It was put on hold as it was considered to be "unclear". Can anyone well aware with the rules of SO, tell me what was the reason for closing the question. I haven't
  • I have problems with an invoking to an asyncTask. It says that I cannot use static method non-excute method 'excute(Params...)' cannot be referenced from a static context. I have browsed through this site and other, I cannot find an useable solution
  • I have problems with asyncTask in android programming. I am trying to load a text file in a background thread which is asyncTask. First of all, in my application I send a variable from a class which is controlled by an array-list which is later contr
  • I have read the following text file and have following problem, Filename: QnA.txt Question: What is your name? Answer: XXXX Question: Please tell me your address? Answer: XXX, xxxx-ssss, 00000 Question: Tell me other details Answer: sure, ...........
  • Stack Overflow has lots of questions about configuring virtual hosts, rewrite rules, and .htaccess files. Should I be routinely voting to migrate these to ServerFault? It's always felt like a grey area in regards to Web server configuration files. I'
  • I am new to Android. I am doing small quiz application. I have 5 sets of JSON file like .txt files. Each set consist of 30 questions. My requirement is select 3 questions from each JSON set. Totaly i need to display 15 questions from 5 sets. How can
  • i am using dragon-dictations iPhone SDK Speech Kit for text to Speech in my app. i want to read the headlines in tableView. i am getting the values from coreData and saving them to a textfile (later, i want to do more with the textfile). So between t
  • I have a couple of problems with bukkit. I have written this code: public void reloadDefConfig(File filepath, String fileInJar) { File configFile = filepath; FileConfiguration daConfig = YamlConfiguration.loadConfiguration(configFile); if (!configFil
You Might Also Like