Implemented replacing umlauts

This commit is contained in:
dankito 2020-05-16 23:41:46 +02:00
parent e9a409f04a
commit f6b7c2cd2a
1 changed files with 1 additions and 0 deletions

View File

@ -173,6 +173,7 @@ open class BankIconFinder : IBankIconFinder {
protected open fun findUrlThatContainsBankName(bankName: String, urlCandidates: List<String>): String? { protected open fun findUrlThatContainsBankName(bankName: String, urlCandidates: List<String>): String? {
val bankNameParts = bankName.replace(",", "") val bankNameParts = bankName.replace(",", "")
.replace("-", " ") // to find 'Sparda-Bank' in 'sparda.de' .replace("-", " ") // to find 'Sparda-Bank' in 'sparda.de'
.replace("ä", "ae", true).replace("ö", "oe", true).replace("ü", "ue", true)
.split(" ") .split(" ")
.filter { it.isNullOrBlank() == false } .filter { it.isNullOrBlank() == false }
val urlsContainsPartsOfBankName = mutableMapOf<Int, MutableList<String>>() val urlsContainsPartsOfBankName = mutableMapOf<Int, MutableList<String>>()