I have an Android ListView I would like to sort. Currently I am using Collections.sort which alphabetizes just fine.
However, I would like to take one step further and move the leading “the”. Is there a built in Java or Android method that can handle this?
If not, what is the code I would need?
Use
Collections.sort()with a customComparator<String>that strips out leading"The"s before comparing strings.Demo: http://ideone.com/6hogi