bpmext.text
Contains string processing convenience functions
Methods:

reverse(str) Returns: {string}
Returns the original string in reverse character order
NameTypeDefaultDescription
str{object}string being processed

trim(str) Returns: {string}
Trims whitespace from both ends of a string
NameTypeDefaultDescription
str{string}string being processed
Example
bpmext.text.trim(" Hello ") returns "Hello"

replace(srch, repl, str) Returns: {string}
null
NameTypeDefaultDescription
srch{string}search target
repl{string}target replacement value
str{string}string being processed
Example
bpmext.text.replace("ABC","XYZ","ABCDEFG") returns "XYZDEFG"

unescapeHTML(str) Returns: {string}
Unescapes the following HTML ampersand character codes " < > &
NameTypeDefaultDescription
str{string}string being processed
Example
bpmext.text.unescapeHTML("AT&T") returns "AT&T"

startsWith(str, prefix) Returns: {boolean}
Determines if the specified string starts with the specified prefix
NameTypeDefaultDescription
str{string}string being processed
prefix{string}Prefix to test against
Example
bpmext.text.startsWith("ABCDEFG","ABC") returns true

trimLeft(str) Returns: {string}
Trims whitespace from the left end of a string
NameTypeDefaultDescription
str{string}string being processed
Example
bpmext.text.trimLeft(" Hello ") returns "Hello "

trimRight(str) Returns: {string}
Trims whitespace from the right end of a string
NameTypeDefaultDescription
str{string}string being processed
Example
bpmext.text.trimRight(" Hello ") returns " Hello"

toString(obj) Returns: {string}
Returns a string value of the specified object
NameTypeDefaultDescription
obj{object}string being processed

escapeHTML(str) Returns: {string}
Escapes the following HTML ampersand character codes " < > &
NameTypeDefaultDescription
str{string}string being processed
Example
bpmext.text.escapeHTML("AT&T") returns "AT&T"

collapse(str) Returns: {string}
Removes all whitespace from a string
NameTypeDefaultDescription
str{string}string being processed
Example
bpmext.text.collapse(" Help Me ") returns "HelpMe"

endsWith(str, suffix) Returns: {boolean}
Determines if the specified string ends with the specified prefix
NameTypeDefaultDescription
str{string}string being processed
suffix{string}Suffix to test against
Example
bpmext.text.endsWith("ABCDEFG","ABC") returns false