Added compare().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5752 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user