I have a string and I need to delete following characters
\ " { ] }
from a string. Everything working fine except the double quotation mark.
My string is :
{"fileId":1902,"x":38,"y":97}
after the following operations are performed:
let charsToBeDeleted = CharacterSet(charactersIn: "\"{]}")
let trimmedStr = str.trimmingCharacters(in: charsToBeDeleted)
print(trimmedStr)
prints:
fileId":1902,"x":38,"y":97
It trimmed first double quotation mark but not the other ones. How can I trim this string without double quotation marks?