Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Book NSSet
//gcc 5.0.4 #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSSet *statinoryitems=[NSSet setWithObjects:@"Pen",@"Pencil",@"Book",@"Marker",nil]; NSSet *statinoryitems2=[NSSet setWithObjects:@"Pen",@"Pencil",@"Book",@"Marker",nil]; NSSet *statinoryitems3=[NSSet setWithObjects:@"Pen",@"Pencil",@"Book",@"Marker",nil]; NSSet *PurItems=[NSSet setWithObjects:@"a",@"b",@"c",@"d",nil]; NSLog (@"%@",statinoryitems); for(id items in statinoryitems) { NSLog(@"%@",items); } if([statinoryitems isEqualToSet:statinoryitems3 ]) {NSLog(@"All items is Good"); } if([statinoryitems intersectsSet:statinoryitems2 ]) {NSLog(@"All items is Awesome"); } if([statinoryitems isSubsetOfSet:statinoryitems ]) {NSLog(@"All items is Not Bad"); } if([statinoryitems containsObject:@"Book" ]) {NSLog(@"Book Mil Gaya"); } NSSet *newSet=[statinoryitems setByAddingObjectsFromSet:PurItems]; NSLog(@"%@",newSet); [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
Cylinder And Circle
Inheritance Example
asss
nsset
linear hybrid cellular automaton reversible random bit generator
Sum Example
objective c find factorial
geomatric operations in objective c
NSString & MutableNSString Examples in one
book