diff --git a/src/as/com/threerings/util/StringUtil.as b/src/as/com/threerings/util/StringUtil.as index 7c700daf0..c6d673178 100644 --- a/src/as/com/threerings/util/StringUtil.as +++ b/src/as/com/threerings/util/StringUtil.as @@ -53,6 +53,14 @@ public class StringUtil return (str == null) || (str.search("\\S") == -1); } + /** + * Return the specified String, or "" if it is null. + */ + public static function deNull (str :String) :String + { + return (str == null) ? "" : str; + } + /** * Does the specified string end with the specified substring. */