OK for an ip xx.xx.xx.xx that i need to check for range between xx.xx.xx.yy & xx.xx.xx.zz i have
Code:
NSArray *checkIP = [[NSArray alloc]initWithArray:[myIpString componentsSeparatedByString:@"."]];
Likewise i have NSArrays for the startIP & endIP range.
How do i check if the first three numbers of checkIP
xx.xx.xx.xx are same as that of startIP &/OR endIP before i proceed to check the last number in the ip?
I dont want to check it number by number using objectAtIndex though i could. I've read the documentation for NSIndexSet to try and use it like if [checkIP objectsAtIndexes:NSIndexSet] (for array indexes 1-3) bt i hvnt been able to use it... what am i missing? hw is the IndexSet to be used?
All im looking for is minimum lines of code to check the first 3 numbers of someIP are same as first three numbers of my IP range limits.