Lets say I have a Swift string
"Hello I'm John Doe"
I want to replace John Doe with:
Steve.
How is that done with Swift 3? The syntax is taking me forever to figure out.
I've tried a few things, one of them is x.replaceSubrange, but it has a syntax that I'm not able to figure out.
x?.replaceSubrange(<#T##bounds: Range##Range#>, with: <#T##String#>)
I tried to create a range with NSRange, but it didn't like that either.