NSIndexSet: Implement enumerateRangesInRange convenience methods

This commit is contained in:
hmelder 2024-05-06 16:46:05 +02:00 committed by Hugo Melder
parent 2a5287f878
commit 6155329b64
2 changed files with 111 additions and 0 deletions

View file

@ -113,6 +113,19 @@ DEFINE_BLOCK_TYPE(GSIndexSetEnumerationBlock, void, NSUInteger, BOOL*);
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST)
DEFINE_BLOCK_TYPE(GSIndexSetRangeEnumerationBlock, void, NSRange, BOOL*);
- (void)enumerateRangesInRange:(NSRange)range
options:(NSEnumerationOptions)opts
usingBlock:(GSIndexSetRangeEnumerationBlock)aBlock;
- (void)enumerateRangesUsingBlock:(GSIndexSetRangeEnumerationBlock)aBlock;
- (void)enumerateRangesWithOptions:(NSEnumerationOptions)opts
usingBlock:(GSIndexSetRangeEnumerationBlock)aBlock;
#endif
/**
* Returns the first index value in the receiver or NSNotFound if the
* receiver is empty.