mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: rename RangeReplaceableCollectionType.extend() to appendContentsOf()
rdar://21972324 Swift SVN r30607
This commit is contained in:
@@ -638,9 +638,9 @@ extension _StringCore : RangeReplaceableCollectionType {
|
||||
: representableAsASCII() && !newElements.contains { $0 > 0x7f } ? 1
|
||||
: 2
|
||||
))
|
||||
r.extend(self[0..<subRange.startIndex])
|
||||
r.extend(newElements)
|
||||
r.extend(self[subRange.endIndex..<count])
|
||||
r.appendContentsOf(self[0..<subRange.startIndex])
|
||||
r.appendContentsOf(newElements)
|
||||
r.appendContentsOf(self[subRange.endIndex..<count])
|
||||
self = r
|
||||
}
|
||||
}
|
||||
@@ -660,7 +660,7 @@ extension _StringCore : RangeReplaceableCollectionType {
|
||||
_copyInPlace(newSize: count, newCapacity: max(count, n), minElementWidth: 1)
|
||||
}
|
||||
|
||||
public mutating func extend<
|
||||
public mutating func appendContentsOf<
|
||||
S : SequenceType
|
||||
where S.Generator.Element == UTF16.CodeUnit
|
||||
>(s: S) {
|
||||
|
||||
Reference in New Issue
Block a user