How to remove Unicode U+2018 LEFT SINGLE QUOTATION MARK from strings like -
Ghulam ‘Ali, ‘Ali Khel,‘Ali Sher ‘Alaqahdari.
I want to remove occurrences of ‘A ||
Since the U+2018 character doesn't appear to be treated as a diacritic, you can simple search for such characters and remove them.
Here is the Swift 4 version (as specified in your original question) that removes diacritics and these specific quotation marks:
var myString = "Sozmah Qal‘ah"
var diacriticRemovedString = myString.folding(options: .diacriticInsensitive, locale: Locale.current).replacingOccurrences(of: "‘", with: "")
print(diacriticRemovedString)
Output:
Sozmah Qalah