Ansal Antony Ansal Antony - 2 years ago 105
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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download