need identical string comparison function in php and java
- by steelbytes
I have sorted list of strings that I move between php and java. to be able to bsearch on this data, I need the same comparison function.
any idea what string compare functions I can use that will always give the same result in both? eg php's strcmp() vs java's String.compareTo()
yes I know I could make my own string compare that does char by char carefully, but I was hoping there's a simple answer.
PS, don't care if case sensitive or not, as long as it is consistant.