mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Rename 'countElements' => 'count'
The name was not only long and unwieldy, but inconsistent with our conscious decision to avoid the use of "elements" in APIs as mostly redundant. Swift SVN r22408
This commit is contained in:
@@ -233,7 +233,7 @@ extension String.UnicodeScalarView : RangeReplaceableCollectionType {
|
||||
///
|
||||
/// Invalidates all indices with respect to `self`.
|
||||
///
|
||||
/// Complexity: O(\ `countElements(subRange)`\ ) if `subRange.endIndex
|
||||
/// Complexity: O(\ `count(subRange)`\ ) if `subRange.endIndex
|
||||
/// == self.endIndex` and `isEmpty(newElements)`\ , O(N) otherwise.
|
||||
public mutating func replaceRange<
|
||||
C: CollectionType where C.Generator.Element == UnicodeScalar
|
||||
@@ -252,7 +252,7 @@ extension String.UnicodeScalarView : RangeReplaceableCollectionType {
|
||||
///
|
||||
/// Invalidates all indices with respect to `self`.
|
||||
///
|
||||
/// Complexity: O(\ `countElements(self)`\ ).
|
||||
/// Complexity: O(\ `count(self)`\ ).
|
||||
public mutating func insert(newElement: UnicodeScalar, atIndex i: Index) {
|
||||
Swift.insert(&self, newElement, atIndex: i)
|
||||
}
|
||||
@@ -261,7 +261,7 @@ extension String.UnicodeScalarView : RangeReplaceableCollectionType {
|
||||
///
|
||||
/// Invalidates all indices with respect to `self`.
|
||||
///
|
||||
/// Complexity: O(\ `countElements(self) + countElements(newElements)`\ ).
|
||||
/// Complexity: O(\ `count(self) + count(newElements)`\ ).
|
||||
public mutating func splice<
|
||||
S : CollectionType where S.Generator.Element == UnicodeScalar
|
||||
>(newElements: S, atIndex i: Index) {
|
||||
@@ -272,7 +272,7 @@ extension String.UnicodeScalarView : RangeReplaceableCollectionType {
|
||||
///
|
||||
/// Invalidates all indices with respect to `self`.
|
||||
///
|
||||
/// Complexity: O(\ `countElements(self)`\ ).
|
||||
/// Complexity: O(\ `count(self)`\ ).
|
||||
public mutating func removeAtIndex(i: Index) -> UnicodeScalar {
|
||||
return Swift.removeAtIndex(&self, i)
|
||||
}
|
||||
@@ -281,7 +281,7 @@ extension String.UnicodeScalarView : RangeReplaceableCollectionType {
|
||||
///
|
||||
/// Invalidates all indices with respect to `self`.
|
||||
///
|
||||
/// Complexity: O(\ `countElements(self)`\ ).
|
||||
/// Complexity: O(\ `count(self)`\ ).
|
||||
public mutating func removeRange(subRange: Range<Index>) {
|
||||
Swift.removeRange(&self, subRange)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user