Clear array by range


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // Starting at position 20, get others characters
  2. NSRange range = NSMakeRange (20, ([array count]-20));
  3. NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:range];
  4. [array removeObjectsAtIndexes:indexSet];

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.