Ignoring diacritic characters when comparing words with special characters (é, è, …)

前端 未结 8 1477
梦如初夏
梦如初夏 2021-02-05 18:08

I have a list with some Belgian cities with diacritic characters: (Liège, Quiévrain, Franière, etc.) and I would like to transform these special characters to compare with a lis

8条回答
  •  花落未央
    2021-02-05 18:34

    I don't know if it is avaible on Android but on the JVM, you should not reimplement it in your project and reuse already existing code: just use org.apache.commons.lang3.StringUtils#stripAccents

提交回复
热议问题