September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,8 +0,0 @@
|
|||
NSArray *haystack = [NSArray arrayWithObjects:@"Zig",@"Zag",@"Wally",@"Ronald",@"Bush",@"Krusty",@"Charlie",@"Bush",@"Bozo",nil];
|
||||
for (id needle in [NSArray arrayWithObjects:@"Washington",@"Bush",nil]) {
|
||||
int index = [haystack indexOfObject:needle];
|
||||
if (index == NSNotFound)
|
||||
NSLog(@"%@ is not in haystack", needle);
|
||||
else
|
||||
NSLog(@"%i %@", index, needle);
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
NSArray *haystack = [NSArray arrayWithObjects:@"Zig",@"Zag",@"Wally",@"Ronald",@"Bush",@"Krusty",@"Charlie",@"Bush",@"Bozo",nil];
|
||||
id needle;
|
||||
NSEnumerator *enm = [[NSArray arrayWithObjects:@"Washington",@"Bush",nil] objectEnumerator];
|
||||
while ((needle = [enm nextObject]) != nil) {
|
||||
int index = [haystack indexOfObject:needle];
|
||||
if (index == NSNotFound)
|
||||
NSLog(@"%@ is not in haystack", needle);
|
||||
else
|
||||
NSLog(@"%i %@", index, needle);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue