Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22098225: Add indexOfObject:inSortedRange:options:usingComparator: method in Swift Array #23

Open
openradar-mirror opened this issue Aug 3, 2015 · 0 comments

Comments

@openradar-mirror
Copy link

Description

Although NSArray and NSOrderedSet have method indexOfObject:inSortedRange:options:usingComparator:, there is no such method in Swift Array.

By now there are two options to bypass this problem:

  1. Implement your own binary search method. You can find more on this here http://stackoverflow.com/a/26679191/1722840.
  2. Bridge Swift Array to NSArray and use Foundation method. Though such bridging may be slow (described here: http://swiftdoc.org/swift-2/type/Array/)

Considering all the available options it would be only natural to have such method in Swift.

Product Version: Swift 1.2
Created: 2015-07-31 22:13:23.782710
Originated: 2015-08-01T00:00:00
Open Radar Link: http://www.openradar.me/22098225

@openradar-mirror openradar-mirror added this to the Swift milestone Aug 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant