Strings mutating and non mutating methods

Is there a particular reason why appending and append methods exist but there is no replaceCharacters alongside replacingCharacters? :thinking: There is also others mutating methods that don't have a non mutating one that would be useful in case you need to chain different transformations.

1 Like

That's because replacingCharacters isn't a String method, it's a NSString method that shows up when you import Foundation

Terms of Service

Privacy Policy

Cookie Policy