Namespace: text

bpmext. text

Text namespace containing string convenience functions

Methods

Removes all whitespace from a string
Name Type Description
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.collapse("  Help Me  ") returns "HelpMe"
Determines if the specified string ends with the specified prefix
Name Type Description
str string string being processed
suffix string Suffix to test against
Returns:
Type Description
boolean
Example
bpmext.text.endsWith("ABCDEFG","ABC") returns false
Escapes the following HTML ampersand character codes " < > &
Name Type Description
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.escapeHTML("AT&T") returns "AT&T"
Name Type Description
srch string search target
repl string target replacement value
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.replace("ABC","XYZ","ABCDEFG") returns "XYZDEFG"
Returns the original string in reverse character order
Name Type Description
str object string being processed
Returns:
Type Description
string
Determines if the specified string starts with the specified prefix
Name Type Description
str string string being processed
prefix string Prefix to test against
Returns:
Type Description
boolean
Example
bpmext.text.startsWith("ABCDEFG","ABC") returns true
Returns a string value of the specified object
Name Type Description
obj object string being processed
Returns:
Type Description
string
Trims whitespace from both ends of a string
Name Type Description
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.trim("  Hello  ") returns "Hello"
Trims whitespace from the left end of a string
Name Type Description
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.trimLeft("  Hello  ") returns "Hello  "
Trims whitespace from the right end of a string
Name Type Description
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.trimRight("  Hello  ") returns "  Hello"
Unescapes the following HTML ampersand character codes " < > &
Name Type Description
str string string being processed
Returns:
Type Description
string
Example
bpmext.text.unescapeHTML("AT&T") returns "AT&T"