mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Propagate ExtensibleCollectionType docs
184 undocumented public non-operator APIs remain in core Swift SVN r22231
This commit is contained in:
@@ -185,17 +185,26 @@ extension String.UnicodeScalarView : ExtensibleCollectionType {
|
||||
public init() {
|
||||
self = String.UnicodeScalarView(_StringCore())
|
||||
}
|
||||
public mutating func reserveCapacity(capacity: Int) {
|
||||
_core.reserveCapacity(capacity)
|
||||
/// Reserve enough space to store `n` ASCII characters.
|
||||
///
|
||||
/// Complexity: O(`n`)
|
||||
public mutating func reserveCapacity(n: Int) {
|
||||
_core.reserveCapacity(n)
|
||||
}
|
||||
/// Append `x` to `self`.
|
||||
///
|
||||
/// Complexity: amortized O(1).
|
||||
public mutating func append(x: UnicodeScalar) {
|
||||
_core.append(x)
|
||||
}
|
||||
/// Append the elements of `newElements` to `self`.
|
||||
///
|
||||
/// Complexity: O(*length of result*)
|
||||
public mutating func extend<
|
||||
S : SequenceType where S.Generator.Element == UnicodeScalar
|
||||
>(seq: S) {
|
||||
>(newElements: S) {
|
||||
_core.extend(
|
||||
_lazyConcatenate(lazy(seq).map { $0.utf16 })
|
||||
_lazyConcatenate(lazy(newElements).map { $0.utf16 })
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user