Page History
Panel | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||
INDEXOF
Syntax
Inputs
Return type
Example
|
bgColor | white |
---|
LASTINDEXOF
LASTINDEXOF
returns the index of the last occurrence of a specified substring in a string.
Syntax
Code Block |
---|
LASTINDEXOF ( string , substring )
LASTINDEXOF ( string , substring , startIndex ) |
Inputs
- string - An attribute of base type string, an expression that results in a string or a constant string value.
- substring - An attribute of base type string, an expression that results in a string or a constant string value.
- startIndex - A (positive) integer value indicating at which character the search for the substring should start (inclusive), searching backwards. This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value.
Return type
- integer - the index of the last occurrence of the specified substring or -1 if it is not found
Example
UI Text Box | ||
---|---|---|
| ||
There is no restriction on the value of startIndex. If it is negative, it has the same effect as if it were zero: -1 is returned since there are no characters before character 0. If startIndex is greater than the length of this string, it has the same effect as if it were equal to the length of this string, so the whole string is searched. |
Back to top |
---|
bgColor | white |
---|
SUBSTRING
SUBSTRING
returns the substring of a given string starting from the index provided and ending at the end index if provided, or the end of the string.
Syntax
Code Block |
---|
SUBSTRING ( string , startIndex )
SUBSTRING ( string , startIndex , endIndex ) |
Inputs
- string - An attribute of base type string, an expression that results in a string or a constant string value.
- startIndex - A positive integer value indicating at which character the substring should start (inclusive). This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. The first character starts at index 0.
- endIndex - A positive integer value indicating at which character the substring should end (exclusive). This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. The
endIndex
cannot exceed the length of the string and should be larger than the startIndex.
Return type
- string
Example
Back to top |
---|
bgColor | white |
---|
SUBSTRING BEFORE
SUBSTRING_BEFORE
returns the start of a given string before the first occurrence of substring, or an empty string if substring is not found
Syntax
Code Block |
---|
SUBSTRING BEFORE substring IN string
SUBSTRING_BEFORE ( string , substring ) |
Inputs
- string - An attribute of base type string, an expression that results in a string or a constant string value.
- substring - An attribute of base type string, an expression that results in a string or a constant string value.
Return type
- string
Example
SUBSTRING_BEFORE ( "hello:world:all" , ":" )
Back to top |
---|
bgColor | white |
---|
SUBSTRING AFTER
SUBSTRING_AFTER
returns the end of a given string after the first occurrence of substring, or an empty string if substring is not found.
Syntax
Code Block |
---|
SUBSTRING AFTER substring IN string
SUBSTRING_AFTER ( string , substring ) |
Inputs
- string - An attribute of base type string, an expression that results in a string or a constant string value.
- substring - An attribute of base type string, an expression that results in a string or a constant string value.
Return type
- string
Example
Back to top |
---|
bgColor | white |
---|
SPLIT
SPLIT
returns a multivalued attribute containing every substring that is delimited by the given pattern.
Syntax
Code Block |
---|
SPLIT string ON pattern
SPLIT ( string , pattern ) |
Inputs
- string - An attribute of base type string, an expression that results in a string or a constant string value.
- pattern - An attribute of base type string or a string value. String must be a valid regular expression. The regular expressions used in several Blueriq Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
Return type
- string (multivalued)
Example
"",
"t" ]UI Text Box | ||
---|---|---|
| ||
If you use the |
Back to top |
---|
bgColor | white |
---|
REPLACE
The REPLACE
function replaces every occurrence of a string pattern within another string with a provided replacement string. The function is case-sensitive.
Syntax
Code Block |
---|
REPLACE pattern IN string WITH replacement
REPLACE ( pattern , string , replacement ) |
- pattern - An attribute of base type string or a string value. String must be a valid regular expression. The regular expressions used in several Blueriq Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
- string - An attribute of base type string or an expression that results in a string.
- replacement - An attribute of base type string or an expression that results in a string.
Return type
- string. If the pattern is not found, the original string is returned.
Examples
UI Text Box | ||
---|---|---|
| ||
The first argument is a pattern (regular expression) and can therefore contain specials like \s for a space. The second and third arguments are strings or expressions, so \s will result in \s. |
Back to top |
---|
bgColor | white |
---|
EQUALS
EQUALS
compares two strings and returns TRUE if and only if they are equal. This function is case sensitive.
UI Text Box | ||
---|---|---|
| ||
Only use this function if you need a case sensitive comparison of two strings. If you want to compare strings case insensitive, use the '=' operator instead. |
Syntax
Code Block |
---|
string1 EQUALS string2
EQUALS ( string1 , string2 ) |
Inputs
- string1 - An attribute of base type string, an expression that results in a string or a constant string value.
- string2 - An attribute of base type string, an expression that results in a string or a constant string value.
Return type
- Boolean
Example
Back to top |
---|