Converted the base CurseFilter to actionscript.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4474 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-12-07 03:43:18 +00:00
parent 509f61c83e
commit 0ffa0211bc
2 changed files with 238 additions and 0 deletions
+20
View File
@@ -45,6 +45,26 @@ public class StringUtil
return (str.lastIndexOf(substr, 0) == 0);
}
/**
* Return true iff the first character is a lower-case character.
*/
public static function isLowerCase (str :String) :Boolean
{
var firstChar :String = str.charAt(0);
return (firstChar.toUpperCase() != firstChar) &&
(firstChar.toLowerCase() == firstChar);
}
/**
* Return true iff the first character is an upper-case character.
*/
public static function isUpperCase (str :String) :Boolean
{
var firstChar :String = str.charAt(0);
return (firstChar.toUpperCase() == firstChar) &&
(firstChar.toLowerCase() != firstChar);
}
/**
* Append 0 or more copies of the padChar String to the input String
* until it is at least the specified length.