File tree Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Expand file tree Collapse file tree 3 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ extension Collection {
138
138
/// four colors:
139
139
///
140
140
/// let colors = ["fuchsia", "cyan", "mauve", "magenta"]
141
- /// for combo in colors.combinations(ofCount k : 3) {
141
+ /// for combo in colors.combinations(ofCount: 3) {
142
142
/// print(combo.joined(separator: ", "))
143
143
/// }
144
144
/// // fuchsia, cyan, mauve
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ extension MutableCollection {
213
213
/// rotating.
214
214
/// - Returns: The new index of the element that was first pre-rotation.
215
215
///
216
- /// - Complexity: O(*n*)
216
+ /// - Complexity: O(*n*), where *n* is the length of the collection.
217
217
@inlinable
218
218
@discardableResult
219
219
public mutating func rotate( toStartAt newStart: Index ) -> Index {
@@ -273,7 +273,7 @@ extension MutableCollection where Self: BidirectionalCollection {
273
273
/// rotating.
274
274
/// - Returns: The new index of the element that was first pre-rotation.
275
275
///
276
- /// - Complexity: O(*n*)
276
+ /// - Complexity: O(*n*), where *n* is the length of the collection.
277
277
@inlinable
278
278
@discardableResult
279
279
public mutating func rotate( toStartAt newStart: Index ) -> Index {
Original file line number Diff line number Diff line change 11
11
12
12
extension BidirectionalCollection {
13
13
14
- /// Returns a `SubSequence` formed by discarding all elements at the start and end of the collection
15
- /// which satisfy the given predicate.
14
+ /// Returns a `SubSequence` formed by discarding all elements at the start and
15
+ /// end of the collection which satisfy the given predicate.
16
16
///
17
- /// This example uses `trimming(where:)` to get a substring without the white space at the
18
- /// beginning and end of the string:
17
+ /// This example uses `trimming(where:)` to get a substring without the white
18
+ /// space at the beginning and end of the string:
19
19
///
20
- /// ```
21
- /// let myString = " hello, world "
22
- /// print(myString.trimming(where: \.isWhitespace)) // "hello, world"
23
- /// ```
20
+ /// let myString = " hello, world "
21
+ /// print(myString.trimming(where: \.isWhitespace)) // "hello, world"
24
22
///
25
- /// - parameters :
26
- /// - predicate: A closure which determines if the element should be omitted from the
27
- /// resulting slice.
23
+ /// - Parameters :
24
+ /// - predicate: A closure which determines if the element should be
25
+ /// omitted from the resulting slice.
28
26
///
29
- /// - complexity: `O(n)` , where `n` is the length of this collection.
27
+ /// - Complexity: O(*n*) , where *n* is the length of this collection.
30
28
///
31
29
@inlinable
32
30
public func trimming(
You can’t perform that action at this time.
0 commit comments