In my application I use a search that works well but I need advice. I do not know how to do that when I search for text without diacritics that the result also with diacriti
You can use range(of:, options:) with options for a diacritic insensitive
(and optionally case insensitive) search. Example:
let list = ["holesovice", "holešovice"]
let searchTerm = "sovi"
let filtered = list.filter {
$0.range(of: searchTerm, options: [.diacriticInsensitive, .caseInsensitive]) != nil
}
print(filtered) // ["holesovice", "holešovice"]