Added compare().

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5752 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-04-28 00:07:25 +00:00
parent abc0bb9eb3
commit 9a50e5f791
+8
View File
@@ -29,6 +29,14 @@ import flash.utils.getQualifiedClassName;
public class StringUtil
{
/**
* Compares two String values, returning -1, 0, or 1.
*/
public static function compare (s1 :String, s2 :String) :int
{
return (s1 > s2) ? 1 : (s1 == s2 ? 0 : -1);
}
/**
* Get a reasonable hash code for the specified String.
*/