stdlib: rename RangeReplaceableCollectionType.extend() to appendContentsOf()

rdar://21972324

Swift SVN r30607
This commit is contained in:
Dmitri Hrybenko
2015-07-25 00:36:37 +00:00
parent 1a61bab17c
commit d97ac3e64c
22 changed files with 64 additions and 62 deletions

View File

@@ -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) {