mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
This commit is contained in:
@@ -28,7 +28,7 @@ public func <(
|
||||
|
||||
extension String {
|
||||
/// A collection of [Unicode scalar values](http://www.unicode.org/glossary/#unicode_scalar_value) that
|
||||
/// encode a `String` .
|
||||
/// encodes a `String` value.
|
||||
public struct UnicodeScalarView : Collection, CustomStringConvertible, CustomDebugStringConvertible {
|
||||
internal init(_ _core: _StringCore) {
|
||||
self._core = _core
|
||||
@@ -200,8 +200,8 @@ extension String {
|
||||
internal var _iterator: IndexingIterator<_StringCore>!
|
||||
}
|
||||
|
||||
/// Return an *iterator* over the `UnicodeScalar`s that comprise
|
||||
/// this *sequence*.
|
||||
/// Returns an iterator over the `UnicodeScalar`s that comprise
|
||||
/// this sequence.
|
||||
///
|
||||
/// - Complexity: O(1).
|
||||
@warn_unused_result
|
||||
@@ -352,7 +352,7 @@ extension String.UnicodeScalarIndex {
|
||||
self.init(characterIndex._base._position, unicodeScalars._core)
|
||||
}
|
||||
|
||||
/// Return the position in `utf8` that corresponds exactly
|
||||
/// Returns the position in `utf8` that corresponds exactly
|
||||
/// to `self`.
|
||||
///
|
||||
/// - Requires: `self` is an element of `String(utf8)!.indices`.
|
||||
@@ -361,7 +361,7 @@ extension String.UnicodeScalarIndex {
|
||||
return String.UTF8View.Index(self, within: utf8)
|
||||
}
|
||||
|
||||
/// Return the position in `utf16` that corresponds exactly
|
||||
/// Returns the position in `utf16` that corresponds exactly
|
||||
/// to `self`.
|
||||
///
|
||||
/// - Requires: `self` is an element of `String(utf16)!.indices`.
|
||||
@@ -372,7 +372,7 @@ extension String.UnicodeScalarIndex {
|
||||
return String.UTF16View.Index(self, within: utf16)
|
||||
}
|
||||
|
||||
/// Return the position in `characters` that corresponds exactly
|
||||
/// Returns the position in `characters` that corresponds exactly
|
||||
/// to `self`, or if no such position exists, `nil`.
|
||||
///
|
||||
/// - Requires: `self` is an element of `characters.unicodeScalars.indices`.
|
||||
|
||||
Reference in New Issue
Block a user