How to alphabetically compare two strings in Actionscript 3
I used strcmp(x,y) in C++. Do you know how to do that in as3?
You can use the normal operands != !== == < > <= =>
If it's a simple string compare you're after, don't bother writing one yourself.
var result:int = ObjectUtil.compare("stringA","stringB");
That achieves what you're looking for.