soumya
soumya

Reputation: 3811

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?

Upvotes: 5

Views: 12139

Answers (1)

Nirav D
Nirav D

Reputation: 72420

Use removingPercentEncoding in Swift 3.

let str = string.removingPercentEncoding

For more detail read Apple documentation.

Upvotes: 26

Related Questions