Skip to content

[4.0] Fix extensions to Substring #1256

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

Conversation

ianpartridge
Copy link
Contributor

Cherry-pick #1244 to the 4.0 branch.

This has already been committed to the 4.0 branch in the overlay in swiftlang/swift@3e4a9d8

CC: @moiseev

When a substring gets bridged to NSString, it loses the initial offset,
therefore APIs that accept or return StringIndex ranges should handle
this case explicitly by adding/subtracting the substring start offset.
@ianpartridge
Copy link
Contributor Author

@swift-ci please test

@ianpartridge ianpartridge merged commit 47cf14b into swiftlang:swift-4.0-branch Oct 9, 2017
@ianpartridge ianpartridge deleted the substring-4.0 branch October 9, 2017 12:58
@moiseev
Copy link
Contributor

moiseev commented Oct 9, 2017

Thanks @ianpartridge!

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