cCSVParse

cCSVParse is a Cocoa-class (Apple’s Objective-C Framework), which parses CSV-files quickly and efficiently.
Download

cCSVParse Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Michael Stapelberg
  • Publisher web site:
  • http://michael.stapelberg.de/mxallowd.en

cCSVParse Tags


cCSVParse Description

cCSVParse is a Cocoa-class (Apple’s Objective-C Framework), which parses CSV-files quickly and efficiently. cCSVParse is a Cocoa-class (Apple's Objective-C Framework), which parses CSV-files quickly and efficiently. The focus lies on being able to handle all typical features of the non-standardized CSV-format. These include:· Correctly recognizing separators in quoted entries· Quotes in quoted entries· Newlines in entries· Ability to chose any separator and automatically recognizing the used separator in a fileThese features are the reason why you can't just split an NSString.The function which parses the data is written in C and uses C-strings to reach the highest possible speed. The values are returned as NSStrings in an NSMutableArray for each line.cCSVParse class (including the headers) is only 218 lines of code big (according to SLOCCount) and can therefore be integrated in any project or at least be used as a base for own code.Using the method -(void)setEncoding:(NSStringEncoding)newEncoding you can set the encoding of the file which should be parsed, so you don't have to convert the data by yourself.SampleCSVParser *parser = ;;NSMutableArray *csvContent = ;int c;for (c = 0; c < ; c++) { NSLog(@"content of line %d: %@", c, );};SpeedIn my test, cCSVParse parsed and outputted a 115 KB big and 1500 lines long file in 0.2 seconds.What's New in This Release:· This release fixes compilation with XCode 3.0 (inline-keyword exchanged with static).


cCSVParse Related Software