Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

After upgrading my Xcode to Swift 3, I'm getting this error:

Value of type 'String' has no member 'stringByRemovingPercentEncoding'

What is the alternative for stringByRemovingPercentEncoding in Swift 3?

like image 444
soumya Avatar asked Nov 29 '22 06:11

soumya


1 Answers

Use removingPercentEncoding in Swift 3.

let str = string.removingPercentEncoding

For more detail read Apple documentation.

like image 102
Nirav D Avatar answered May 20 '23 16:05

Nirav D