Sujania Sujania - 10 months ago 298
Swift Question

Value of type 'String' has no member 'stringByRemovingPercentEncoding in swift 3

After upgrading my Xcode to swift 3, I'm getting an error.

Value of type 'String' has no member 'stringByRemovingPercentEncoding

If any one know the alternative for this in Swift 3 please suggest me.

Answer Source

Use removingPercentEncoding in Swift 3.

let str = string.removingPercentEncoding

For more detail read Apple documentation.