Sujania Sujania - 2 months ago 85
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

Use removingPercentEncoding in Swift 3.

let str = string.removingPercentEncoding

For more detail read Apple documentation.