Cloud Software Group, Inc. EBX®
Documentation > Developer Guide > EBX® Script > API
Navigation modeDocumentation > Developer Guide > EBX® Script > API

Unit core.string

Script unit that provides string manipulation functions.

Methods

function contains(value: string, searchString: string): boolean

Returns true if a value string contains a searchString.

function endsWith(value: string, suffix: string): boolean

Returns true if a value string ends with a suffix.

function isEmpty(value: string): boolean

Returns true if value is null or a zero length string.

function join(separator: string [, substring: string]...): string

Returns a new string compose of all input substrings separated by as separator string.

function replaceAll(value: string, pattern: string, replacement: string): string

Returns a new string with all pattern occurrences in input value string replaced with replacement.

function replaceFirst(value: string, pattern: string, replacement: string): string

Returns a new string with the first pattern occurrence in input value string replaced with replacement.

function right(value: string, index: decimal): string

Returns a new string that contains the right characters from value string.

function startsWith(value: string, prefix: string): boolean

Returns true if a value string starts with a prefix.

function substring(value: string, startIndex: decimal, endIndex: decimal): string

Returns a new string that contains a subsequence of characters from value string.

function toLowerCase(value: string): string

Returns a new string with all characters from input value string to lower case.

function toUpperCase(value: string): string

Returns a new string with all characters from input value string to upper case.

contains

function contains(value: string, searchString: string): boolean

Returns true if a value string contains a searchString.

Parameters :

value: the input string

searchString: the input searchString to look for

Return :

true if value contains the searchString or else false.

Returns null if any parameters is null.

Can be used in: Script tasks, Table triggers, Function fields

endsWith

function endsWith(value: string, suffix: string): boolean

Returns true if a value string ends with a suffix.

Parameters :

value: the input string

prefix: the input suffix to look for

Return :

true if value ends with suffix or else false.

Returns null if any parameters is null.

Can be used in: Script tasks, Table triggers, Function fields

isEmpty

function isEmpty(value: string): boolean

Returns true if value is null or a zero length string.

Parameters :

value: a string value.

Return :

true if value is null or a zero length string, or else false. Never returns null.

Can be used in: Script tasks, Table triggers, Function fields

join

function join(separator: string [, substring: string]...): string

Returns a new string compose of all input substrings separated by as separator string.

Parameters :

separator: the input separator string

substring: a substring to add to the result string. All element must be string.

Return :

a new string compose of all input substrings separated by the separator input.

If any parameters is null or no substrings is provided return null.

Can be used in: Script tasks, Table triggers, Function fields

replaceAll

function replaceAll(value: string, pattern: string, replacement: string): string

Returns a new string with all pattern occurrences in input value string replaced with replacement.

Parameters :

value: the input string

pattern: the string pattern (regex) to replace

replacement: the replacement string

Return :

the new string or null if parameter is null.

Can be used in: Script tasks, Table triggers, Function fields

replaceFirst

function replaceFirst(value: string, pattern: string, replacement: string): string

Returns a new string with the first pattern occurrence in input value string replaced with replacement.

Parameters :

value: the input string

pattern: the string pattern (regex) to replace

replacement: the replacement string

Return :

the new string or null if parameter is null.

Can be used in: Script tasks, Table triggers, Function fields

right

function right(value: string, index: decimal): string

Returns a new string that contains the right characters from value string.

The staring starts from the specified index and extends to the end of the string.

Parameters :

value: the input string

index: the input start index (inclusive). Must be an integer greater or equal to zero and less or equal than the length of the string

Return :

the new string or null if any parameter is null.

Can be used in: Script tasks, Table triggers, Function fields

startsWith

function startsWith(value: string, prefix: string): boolean

Returns true if a value string starts with a prefix.

Parameters :

value: the input string

prefix: the input prefix to look for

Return :

true if value starts with prefix or else false.

Returns null if any parameters is null.

Can be used in: Script tasks, Table triggers, Function fields

substring

function substring(value: string, startIndex: decimal, endIndex: decimal): string

Returns a new string that contains a subsequence of characters from value string.

The sub string start from the specified startIndex and extends to the endIndex of the input string.

Parameters :

value: the input string

startIndex: the input start index (inclusive). Must be an integer greater or equal to zero and less or equal than the length of the string.

endIndex: the input end index (exclusive). Must be an integer greater or equal to startIndex and less or equal than the length of the string.

Return :

the new string or null if any parameter is null.

Can be used in: Script tasks, Table triggers, Function fields

toLowerCase

function toLowerCase(value: string): string

Returns a new string with all characters from input value string to lower case.

Parameters :

value: the input string

Return :

the lower cased string or null if parameter is null.

Can be used in: Script tasks, Table triggers, Function fields

toUpperCase

function toUpperCase(value: string): string

Returns a new string with all characters from input value string to upper case.

Parameters :

value: the input string

Return :

the upper cased string or null if parameter is null.

Can be used in: Script tasks, Table triggers, Function fields

Documentation > Developer Guide > EBX® Script > API