[SR-6948] String has no method .append(_: Substring) #49496
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Environment
Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: b6d112a1f87ab148dc2a8779a2187472
Issue Description:
String
has a method.append(_: String)
but it doesn't expose a corresponding.append(_: Substring)
. This seems like an obvious omission. There is.append(contentsOf:)
that can be used withSubstring
but at a cursory glance it appearsString
doesn't try to optimize this. SimilarlyStringProtocol
definesappending(_:)
but this creates a new string instead of mutating the receiver.The text was updated successfully, but these errors were encountered: