string - Sorting is causing a problem with apostrophe
问题描述
I have an ArrayList of Strings called arrayStr. I am using:
Collections.sort(arrayStr)
to sort this ArrayList. However, I have one minor inconvenience when doing this.
Let's say there is a word called Mary
in the ArrayList and there is another word called Mary's
. The word Mary's
will come before Mary
when I sort the list, but I need it to come right after Mary
.
Does anyone know how to fix this?
解决方案
推荐阅读
- sql - 如何过滤相似的列值
- android - MotionEvent ACTION_UP 中的 x 和 y 有时与之前的 ACTION_MOVE 重复
- java - 停止/暂停线程
- php - 来自外部 api 用户的 Laravel Auth
- c - 如何在arduino中将八进制数转换为十进制数?
- python - Python,网络线程
- postgresql - Python 3.9.1 和 PostgreSQL
- flutter - Flutter 多环境
- python - 提高LBPH人脸识别准确率,使用更多直方图块
- css - 为什么 filter: hue-rotate() 可以更快地通过某些颜色?