Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 0.53 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Sort and structure some address data in an iPhone app
  2. 2133664:American Taxi Dispatch, Inc:Mount Prospect:834 E RAND RD|2133665:Walmart:Mount Prospect:930 Mount Prospect Plaza|
  3.        
  4. NSString* line = @"2133664:American Taxi Dispatch, Inc:Mount Prospect:834 E RAND RD|2133665:Walmart:Mount Prospect:930 Mount Prospect Plaza|"
  5. NSArray* components = [line componentsSeparatedByString:@":"];
  6. NSString entryId = [components objectAtIndex:0];
  7. NSString name = [components objectAtIndex:1];
  8. NSString address = [components objectAtIndex:2];
  9. // etc ...