Package | org.spicefactory.lib.util |
Class | public class StringUtil |
Inheritance | StringUtil Object |
Method | Defined 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 |
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
|
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
|
String — the fully resolved string
|