ios - xcode : retrieving one line of xcode based on search query -


here sample of csv

10820   0   0   0   0 10900   2   4   4   4 11000   21  50  54  58 11100   23  54  59  63 11200   25  59  63  68 11300   27  63  68  73 11400   29  68  73  78 11500   31  72  78  83 11600   32  76  82  88 11700   34  81  87  93 

i'm looking create use xcode retreive 1 line of code lengthy csv based on first line.

for example:

  1. if user enters "10900", second line columns returned.
  2. if user returns 11650, 11600 line columns returned...always taking lower line when input value less following line.

any appreciated. i've seen code parse entire csv file, i'm thinking may big memory drain, right csv has 2000 lines of values, in ascending order based on first column.

you have load file memory anyways find correct value.

with such big csv file recommend turn csv file binary file (plist file example) , put binary application - instead of parsing each time in runtime. has better performance , it's easier work since working directly nsdictonaries nsarrays.

if don't want reason, next solution use chcsvparser: https://github.com/davedelong/chcsvparser

it provides optimization loading part of file @ time - optimization might looking for.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -