Ansal Antony Ansal Antony - 1 year ago 66
Swift Question

How can I remove quotes from String on Swift?

I am trying to remove quotes from Swift

String
something like:

"Hello"

so that the Swift
String
is just:

Hello

N J N J
Answer Source

You can simply use

var str: String = "\"Hello\""


print(str) // "Hello"

print(str.stringByReplacingOccurrencesOfString("\"", withString: "")) // Hello