Packageorg.spicefactory.lib.util
Classpublic class StringUtil
InheritanceStringUtil Inheritance Object

Static utility methods for Strings.



Public Methods
 MethodDefined By
  
format(message:String, ... params):String
[static] Builds a string from the specified message and parameters.
StringUtil
  
formatError(cause:Object):String
[static] Builds a string from the specified error.
StringUtil
Method Detail
format()method
public static function format(message:String, ... params):String

Builds a string from the specified message and parameters. The message may contain numbered placeholders like '{0}' which will be replaced by the specified parameters. For parameters of type Error special formatting will get applied (showing the whole stacktrace in the debug player, the message in the release player).

Parameters

message:String — the message, possibly containing parameter placeholders
 
... params — the parameters to fill the placeholders with

Returns
String — the fully resolved string
formatError()method 
public static function formatError(cause:Object):String

Builds a string from the specified error. This utility method applies special formatting for Error and ErrorEvent types. For unknown types it will simply call toString().

Parameters

cause:Object — the cause of the error to format

Returns
String — the fully resolved string