-(Nsuinteger) count; get the number of objects in nsarray
-(ID) objectatindex :( nsuinteger) index; get the object at the index position in nsarray
-(Nsarray *) arraybyaddingobject :( ID) anobject; add anobject to the end of the array-(nsarray *) arraybyaddingobjectsfromarray :( nsarray *) otherarray;
Add the objects in the otherarray array to the end of the stolen Array
-(Nsstring *) componentsjoinedbystring :( nsstring *) separator;
The elements in the array are separated by separator to form an nsstring.
-(Bool) containsobject :( ID) anobject;
Determine whether the anobject is in the array
-(Nsstring *) description;
Description of objects in the array, which can output objects in the array (to be further determined)
-(Nsstring *) descriptionwithlocale :( ID) locale;-(nsstring *) descriptionwithlocale :( ID) locale indent :( nsuinteger) level;-(ID) firstobjectcommonwitharray :( nsarray *) otherarray;
Returns the first same object in nsarray and otherarray.
+ (ID) arraywithobjects :( constid []) Objects count :( nsuinteger) CNT;
Nsstring * string [5]; string [0] = @ "first"; string [1] = @ "second"; string [2] = @ "third "; string [3] = @ "forth"; nsarray * array = [nsarray arraywithobjects: String count: 3]; output result: First, Second, Third
-(Void) getobjects :( ID _ unsafe_unretained []) Objects range :( nsange) range; extracts the data corresponding to the nsange from the array objects, and the data in the range indicates the data from the range. location starts to range. length Element
NSArray *mArray = [NSArray arrayWithObjects:@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", nil];id *objects;NSRange range = NSMakeRange(2, 3);objects = malloc(sizeof(id) * range.length);[mArray getObjects:objects range:range];for (NSInteger i = 0; i < range.length; i++){ NSLog(@"objects: %@", objects[i]);}free(objects);
-(Nsuinteger) indexofobject :( ID) anobject inrange :( nsange) range;
The index position of the anobject within the range in the entire array
-(Nsenumerator *) objectenumerator;
Obtain nsenumerator of the array in sequence
-(Nsenumerator *) reverseobjectenumerator;
Returns the nsenumerator of the array in reverse order.
NSEnumerator *enumerator = [mArray objectEnumerator];id object;while((object = [enumerator nextObject])){ NSLog(@"object:%@",object);}