mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Various revisions and fixes for documentation
- Fix wording for RandomAccessCollection - Add note about array growth to reserveCapacity(_:) - Reformat lazy flatMap discussions - Improve Collection symbol consistency
This commit is contained in:
@@ -17,7 +17,7 @@ extension String {
|
||||
/// The index type for subscripting a string.
|
||||
public typealias Index = CharacterView.Index
|
||||
|
||||
/// A type used to represent the number of steps between two `String.Index`
|
||||
/// A type that represents the number of steps between two `String.Index`
|
||||
/// values, where one value is reachable from the other.
|
||||
///
|
||||
/// In Swift, *reachability* refers to the ability to produce one value from
|
||||
@@ -59,8 +59,8 @@ extension String {
|
||||
/// print(s[i])
|
||||
/// // Prints "t"
|
||||
///
|
||||
/// The value passed as `n` must not offset `i` beyond the `endIndex` or
|
||||
/// before the `startIndex` of this collection.
|
||||
/// The value passed as `n` must not offset `i` beyond `endIndex` or before
|
||||
/// `startIndex` for this collection.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - i: A valid index of the collection.
|
||||
@@ -98,9 +98,9 @@ extension String {
|
||||
/// print(j)
|
||||
/// // Prints "nil"
|
||||
///
|
||||
/// The value passed as `n` must not offset `i` beyond the `endIndex` or
|
||||
/// before the `startIndex` of this collection, unless the index passed as
|
||||
/// `limit` prevents offsetting beyond those bounds.
|
||||
/// The value passed as `n` must not offset `i` beyond `endIndex` or before
|
||||
/// `startIndex` for this collection, unless the index passed as `limit`
|
||||
/// prevents offsetting beyond those bounds.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - i: A valid index of the collection.
|
||||
|
||||
Reference in New Issue
Block a user