ios - Is there a way to convert special characters to normal characters in Swift? -


this question has answer here:

suppose have string value special accents :

éáüîāṁṇār̥ 

is there universal/dynamic way convert/strip these types of characters down basic formatting ?..

eauiamnar 

use stringbyfoldingwithoptions , pass .diacriticinsensitivesearch

let s = "éáüîāṁṇār̥" let r = s.stringbyfoldingwithoptions(.diacriticinsensitivesearch, locale: nil) print(r) // prints eauiamnar 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -