Instance Method

shiftIndexesStartingAtIndex:by:

Shifts a group of indexes to the left or the right within the receiver.

Declaration

- (void)shiftIndexesStartingAtIndex:(NSUInteger)index by:(NSInteger)delta;

Parameters

startIndex

Head of the group of indexes to shift.

delta

Amount and direction of the shift. Positive integers shift the indexes to the right. Negative integers shift the indexes to the left.

Discussion

The group of indexes shifted is made up by startIndex and the indexes that follow it in the set.

A left shift deletes the indexes in a range the length of delta preceding startIndex from the set.

A right shift inserts empty space in the range (startIndex,delta) in the receiver.

The resulting indexes must all be in the range 0 .. NSNotFound - 1.