Motivational example:

var urlString = self.urlString
if urlString.hasPrefix("//") {
        urlString = "http:" + urlString // urlString needs to be typed twice
}

While there is currently an easy way to append string using +=, there is no 
shortcut for prefixing a string. What I propose is adding a =+ operator for 
prefixing the string:

urlString =+ "http:"

Would anyone else find it useful?
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to