Namespace Util
Defined in: </ScriptBot/trunk/src/app/util.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
A collection of useful functions to handle various things or convert Java objects to JS equivalents.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
Util.isTrue(value)
Checks to see if a Java object is a Java boolean with the value "true",
and returns a JavaScript boolean literal.Only guaranteed to work
correctly for Java Boolean objects.
|
| <static> |
Util.isUndefined(value)
Checks to see if a Java object represents the JavaScript value
of undefined and returns a JavaScript boolean literal.Only
guaranteed to work correctly for Java undefined objects.
|
| <static> |
Util.stripHTML(dirtystring)
Strips HTML-like tags from a string.
|
| <static> |
Util.toJsString(value)
Converts a Java String-Object to a JavaScript string literal.
|
| <static> |
Util.trim(value)
Removes white-space characters from the beginning of the given value.
|
| <static> |
Util.verifyTarget(target, message)
Verifies the submitted message is intended for the specified target.
|
Namespace Detail
Util
A collection of useful functions to handle various things or convert Java objects to JS equivalents.
Author: AMcBain, 2008.
Author: AMcBain, 2008.
- Since:
- 2.0.1
Method Detail
<static>
{boolean}
Util.isTrue(value)
Checks to see if a Java object is a Java boolean with the value "true",
and returns a JavaScript boolean literal.Only guaranteed to work
correctly for Java Boolean objects.
- Parameters:
- {java.lang.Boolean} value
- The object to be checked.
- Since:
- 2.0.1
- Returns:
- a JavaScript boolean literal.
<static>
{boolean}
Util.isUndefined(value)
Checks to see if a Java object represents the JavaScript value
of undefined and returns a JavaScript boolean literal.Only
guaranteed to work correctly for Java undefined objects.
- Parameters:
- {Object} value
- The object to be checked.
- Since:
- 2.0.1
- Returns:
- a JavaScript boolean literal.
<static>
Util.stripHTML(dirtystring)
Strips HTML-like tags from a string.
- Parameters:
- {string} dirtystring
- The string to strip of HTML-like tags.
- Since:
- 2.0.4
- Returns:
- a string clean of all HTML-like tags.
<static>
{string}
Util.toJsString(value)
Converts a Java String-Object to a JavaScript string literal.
- Parameters:
- {java.lang.String} value
- The object to be converted.
- Since:
- 2.0.1
- Returns:
- a JavaScript string literal.
<static>
{string}
Util.trim(value)
Removes white-space characters from the beginning of the given value.
- Parameters:
- {string} value
- The string to be trimmed.
- Since:
- 2.0.1
- Returns:
- a string
<static>
Util.verifyTarget(target, message)
Verifies the submitted message is intended for the specified target.
- Parameters:
- {string} target
- The target to be checked for.
- {string} message
- The message to be checked.
- Since:
- 2.0.1
- Returns:
trueif the message is for the target,falseotherwise.