mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Implementation of the SE-130 proposal.
It replaces String initializers taking Character or UnicodeScalar as a repeating value by a more general initializer that takes a String as a repeating value. This is done to avoid the ambiguities in the current String API, which can be only resolved by explicit casting. String.append(_:UnicodeScalar) APIs is also removed to match these changes.
This commit is contained in:
@@ -651,8 +651,9 @@ extension String {
|
||||
///
|
||||
/// - Complexity: Appending a Unicode scalar to a string averages to O(1)
|
||||
/// over many additions.
|
||||
@available(*, unavailable, message: "Replaced by append(_: String)")
|
||||
public mutating func append(_ x: UnicodeScalar) {
|
||||
_core.append(x)
|
||||
Builtin.unreachable()
|
||||
}
|
||||
|
||||
public // SPI(Foundation)
|
||||
|
||||
Reference in New Issue
Block a user