Script unit that provides string manipulation functions.
Methods |
---|
function isEmpty(value: string): boolean Returns |
function right(value: string, index: decimal): string Returns a new string that contains the right characters from |
function substring(value: string, startIndex: decimal, endIndex: decimal): string Returns a new string that contains a subsequence of characters from |
function toUpperCase(value: string): string Returns a new string with all characters from input |
function toLowerCase(value: string): string Returns a new string with all characters from input |
function replaceAll(value: string, pattern: string, replacement: string): string Returns a new string with all |
function replaceFirst(value: string, pattern: string, replacement: string): string Returns a new string with the first pattern occurrence in input |
function startsWith(value: string, prefix: string): boolean Returns |
function endsWith(value: string, suffix: string): boolean Returns |
function contains(value: string, searchString: string): boolean Returns |
function join(separator: string [, substring: string]...): string Returns a new string compose of all input substrings separated by as separator string. |
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.
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. Must be a integer greater or equal to zero and less than the length of the string.
Return :
the new string or null if any parameter is null.
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. Must be a integer greater or equal to zero and less than the length of the string.
endIndex: the input end index. Must be a integer greater or equal to startIndex and less than the length of the string.
Return :
the new string or null if any parameter is null.
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.
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.
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.
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.
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.
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.
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.
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.