# NSArray+GNUstepBase documentation

rfm@gnu.org
Generated at 2025-09-10 09:16:48 +0000
2003-2010 Free Software Foundation, Inc.
Software documentation for the NSArray(GNUstepBase) category
GNUstepBase/NSArray+GNUstepBase.h
Description forthcoming.
insertionPosition:
item
usingFunction:
sorter
context:
context

Method for working with sorted arrays - use a binary chop to determine the insertion location for an object. If equal objects already exist in the array, they will be located immediately before the insertion position.

The comparator function takes two items as arguments, the first is the item to be added, the second is the item already in the array. The function should return NSOrderedAscending if the item to be added is 'less than' the item in the array, NSOrderedDescending if it is greater, and NSOrderedSame if it is equal.

insertionPosition:
item
usingSelector:
comp
Description forthcoming.