Skip to content

[5.1][SE-0248] String Gaps #23706

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 8 commits into from
Apr 2, 2019
Merged

Conversation

milseman
Copy link
Member

@milseman milseman commented Apr 1, 2019

5.1 Cherry-pick of #22869

rdar://problem/32340799
rdar://problem/32358236
rdar://problem/47985579

milseman added 8 commits April 1, 2019 09:51
This adds new (availability-controlled) API to Unicode.Scalar,
exposing the scalar's UTF-8 code units as a random-access collection
similarly to how it currently exposes UTF-16 code units.

Tests added.
Adds a generic version of String.Index.init?(_:within:) and
Range<String.Index>.init?(_:in:).

Tests added
Adds these collections, which are just String's views.

Tests added.
Adds Substring.base, analogous to Slice.base, to access the entire
String.

Tests added.
Add convenience APIs to the stdlib's Unicode encodings:

* Unicode.UTF16
  * isASCII
  * isSurrogate
* Unicode.UTF8
  * isASCII
  * width
* Unicode.UTF32
  * isASCII
* Unicode.ASCII
  * isASCII

Tests added
Bounds check the given index for String.Index's generic initializer
that makes sure a passed index is a valid one for the given
StringProtocol.
@milseman milseman changed the title [5.1] String Grab Bag [5.1][SE-0248] String Gaps Apr 1, 2019
@milseman
Copy link
Member Author

milseman commented Apr 1, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Apr 1, 2019

Build failed
Swift Test OS X Platform
Git Sha - 51d158b

@milseman
Copy link
Member Author

milseman commented Apr 2, 2019

@swift-ci please test OS X platform

@milseman milseman merged commit 3c1d559 into swiftlang:swift-5.1-branch Apr 2, 2019
benrimmington added a commit to swiftlang/swift-evolution that referenced this pull request Apr 3, 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