Skip to content

[stdlib] Rename index(...) methods to firstIndex(...) #16089

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

Merged
merged 1 commit into from
Apr 22, 2018

Conversation

natecook1000
Copy link
Member

A la SE-204. This pulls the index(of:) —> firstIndex(of:) changes out of #13337.

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

Copy link
Member

@airspeedswift airspeedswift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only thing missing is a test that the old index func still works. Can be done as a follow on PR.

@natecook1000 natecook1000 merged commit cfaf599 into swiftlang:master Apr 22, 2018
@natecook1000 natecook1000 deleted the nc-firstindex branch April 22, 2018 01:55
natecook1000 added a commit to natecook1000/swift that referenced this pull request Apr 24, 2018
[stdlib] Rename index(...) methods to firstIndex(...)
natecook1000 added a commit that referenced this pull request Apr 26, 2018
* Merge pull request #16089 from natecook1000/nc-firstindex

[stdlib] Rename index(...) methods to firstIndex(...)

* [stdlib] Implement sequence/collection methods for searching from the end (#13337)

This implements the new last(where:), and lastIndex(of/where:) methods as
extensions on `BidirectionalCollection`, which partially implements SE-204.
The protocol requirements for `Sequence` and `Collection` as described
in the proposal need to wait until there's a solution for picking up the
specialized versions in types that conditionally conform to `BidirectionalCollection`.
emlaver added a commit to cloudant/swift-cloudant that referenced this pull request Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants