3
I know there’s already question, I even used the same title to call attention, but this one refers to C#, I’m having this problem in java, code:
//historico e searchC são ArrayLists, no caso do case utilizei o
//toUpperCase() para igualar, porém, em questão de acentos ele não retorna
//nenhum valor, mesmo estando exatamente igual ao valor da linha do array
int i = 0;
for (String[] linha : historico){
if(linha[2].contains(nome.toUpperCase())) {
searchC.add(historico.get(i));
}
i++;
}
Case the variable nome contains any type of accent, no value is returned in the searchC. Does anyone know how to make the comparison by disregarding accents and marry directly?
Copied my example :p
– user28595
From what I understand, he wants to see if they count, not if it’s the same. Check if "This is John" contains "John" will return false in your example, even if it contains.
– user28595
@Articuno, I took your example to show in another way :D
– Wellington Cabral
True! I made an equals and not a contains. Fixing the code!
– Wellington Cabral