...
Functions are entered using the following formats:
Panel |
---|
Html bobswift | <pre>
${_function}
${_function(arg1, ..., argN)}
</pre> |
Anchor |
---|
| Formatting Rules |
---|
| Formatting Rules |
---|
|
Formatting Rules
...
- Functions must be written either:
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
- String parameters must be enclosed in single or double quotation marks.
- Integer and Boolean parameters can be enclosed in single or double quotation marks.
- Optional parameters are identified on this page by being enclosed in [square brackets]. When copying a function from the documentation, be sure to remove the square brackets; otherwise, the function will not resolve.
- If a function has more than one optional parameter, any optional parameters preceding a specified optional parameter must be included in the function's parameter list. For example:
- For function
${_responseJsonPath('pathExpression'[,'defaultValue','delimiter',prettyPrint])}
...
...
...
${_responseJsonPath('.outputData','','',true)}
...
...
...
...
...
${_responseJsonPath('.outputData',,,true)}
...
...
...
...
...
...
...
${_formatDate(['date_time',
...
...
...
...
...
...
...
...
...
${_formatDate('2018-09-01','',0,true)}
...
...
...
...
...
${_formatDate('2018-09-01','',,true)}
...
...
...
...
...
- All functions allow nesting to two levels. That is, a function can be an argument to another function, which itself can be an argument to another function.
- You must use a double underscore preceding the name of a first-level nested function.
- You must use a triple underscore preceding the name of a second-level nested function.
For example, for 2nd day of next month less one Business Day:
Panel |
---|
${_formatDate('${__dayOfMonth(2,'${___dateadv('yyyy-MM-dd',0,1)}')}','',-1,true)} </pre> |
Anchor |
---|
| Function Categories |
---|
| Function Categories |
---|
|
Function Categories
...
Description | Resolves to the current date and time. |
---|
Syntax | ${_date(['format', day_offset, hour_offset, minute_offset]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>format</code> <br> <code>format</code> see
Html bobswift | <li> <code>day_offset</code> <br>
<li> <code>hour_offset</code> <br>
<li> <code>minute_offset</code> <br>
</ul> |
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_date} --> 2012-07-14 12:43:06 -0400
${_date()} --> 2012-07-14 12:43:06 -0400
${_date('yyyy-MM-dd', 5)} --> 2012-07-19
${_date('yyyy-MM-dd HH:mm:ss', -2, -1)} --> 2012-07-12 11:43:06
${_date('', 0, 0, 10)} --> 2012-07-14 12:53:06 -0400
</pre> |
|
|
---|
...
Description | Resolves to the current date and time. |
---|
Syntax | ${_dateadv(['format', year_offset, month_offset, day_offset, hour_offset, minute_offset]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>format</code> <br>Date <code>format</code>
Html bobswift | <li> <code>year_offset</code> <br>Optional; year_offset Optional; +/-
<li> <code>month_offset</code> <br>Optional; month_offset Optional; +/-
<li> <code>day_offset</code> <br>Optional;
<li> <code>hour_offset</code> <br>Optional; hour_offset Optional; +/-
<li> <code>minute_offset</code> <br>Optional; minute_offset Optional; +/-
</ul> |
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_dateadv} --> 2012-07-29 09:31:42 -0700
${_dateadv('yyyy-MMM', -1)} --> 2011-Jul
${_dateadv('yyyy-MMM', 0, -1)} --> 2012-Jun </pre> |
|
|
---|
...
Description | Returns the date after applying offsets. Optionally, can specify the output format.
|
---|
Syntax | ${_formatDate(['date_time', 'format', day_offset, use_business_days, hour_offset, minute_offset, timezone]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>date_time</code> <br>Date and time in any of the following formats:
<ul>
<li> date_time Date and time in any of the following formats:
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
Default is the current date and time.
<li> <code>format</code> <br>Format of returned date. If date_time specifies a time, the default format is - Default is the current date and time.
format Format of returned date. If date_time specifies a time, the default format is yyyy-MM-dd <code>format</code>
Html bobswift | <li> <code>day_offset</code> <br>
<li> <code>usedays</code> <br>Specification (<code>true</code> or <code>false</code>) for whether <code>day_offset</code> is for business days. Default is false.
<li> <code>hour_offset</code> <br>+/- number of hours to offset.
<li> <code>minute_offset</code> <br>+/- number of minutes to offset.
<li> <code>timezone</code> <br>Time Zone that the date is formatted in.
</ul>days Specification (true or false ) for whether day_offset is for business days. Default is false.hour_offset +/- number of hours to offset.minute_offset +/- number of minutes to offset.timezone Time Zone that the date is formatted in.
|
---|
Example |
Panel |
---|
Html bobswift |
---|
<pre>
${_formatDate} --> 2018-08-24 15:37
${_formatDate()} --> 2018-08-24 15:37
${_formatDate('','MMddyyyy',5)} --> 08292018
${_formatDate('2018-09-01','',5)} --> 2018-09-06
${_formatDate('2018-09-01','',-5)} --> 2018-08-27
${_formatDate('2018-10-13 12:13:14 -0400','',5,true,0,0,'Australia/Sydney')} --> 2018-10-14 03:13:14 +1100
</pre> |
|
|
---|
...
Description | Returns the date after applying offsets. Optionally, can specify the output format.
|
---|
Syntax | ${_formatDateAdv(['date_time', 'format', year_offset, month_offset, day_offset, use_business_days, hour_offset, minute_offset, timezone]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>date_time</code> <br>Date and time in any of the following formats:
<ul>
<li> date_time Date and time in any of the following formats:
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
Default is the current date and time.
<li> <code>format</code> <br>Format of returned date. If date_time specifies a time, the default format is - Default is the current date and time.
format Format of returned date. If date_time specifies a time, the default format is yyyy-MM-dd
<code>format</code>
Html bobswift | <li> <code>year_offset</code> <br>Optional; year_offset Optional; +/-
<li> <code>month_offset</code> <br>Optional; month_offset Optional; +/-
<li> <code>day_offset</code> <br>Optional;
<li> <code>usedays</code> <br>Optional; Specification (<b>true</b> or <b>false</b>) for whether <code>day_offset</code> is for business days. Default is false.
<li> <code>hour_offset</code> <br>+/- number of hours to offset.
<li> <code>minute_offset</code> <br>+/- number of minutes to offset.
<li> <code>timezone</code> <br>Time Zone that the date is formatted in.
</ul>days Optional; Specification (true or false) for whether day_offset is for business days. Default is false.hour_offset +/- number of hours to offset.minute_offset +/- number of minutes to offset.timezone Time Zone that the date is formatted in.
|
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_formatDateAdv} --> 2012-08-24 15:55
${_formatDateAdv()} --> 2012-08-24 15:55
${_formatDateAdv('','MMddyyyy',1)} --> 08242013
${_formatDateAdv('2012-09-01','',0,1)} --> 2012-10-01
${_formatDateAdv('2012-09-01','',0,-1)} --> 2012-08-01
${_formatDateAdv('2012-09-01','',0,0,5,false)} --> 2012-09-06
</pre> |
|
|
---|
...
Description | Returns the Date and Time in another time zone. |
---|
Syntax | ${_formatDateTz('date_time', 'target_time_zone'[, 'output_format']) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>date_time</code> <br>Date and time in any of the following formats:
<ul>
<li> date_time Date and time in any of the following formats:
<li>
<li>
<li>
<li>
<li>
</ul>
<li> <code>targetzone</code> <br>Time zone in which to format the date and time.
<li> <code>output_format</code> <br>Optional; Format of the date and time in the other time zone.
</ul>zone Time zone in which to format the date and time.output_format Optional; Format of the date and time in the other time zone.
|
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_formatDateTz('2018-10-13 01:02:03 -0400', 'Australia/Sydney')} --> 2018-10-13 16:02:03 +1100
${_formatDateTz('2018-10-13 01:02:03 -0400', 'Australia/Sydney','yyyy-MM-dd HH:mm Z')} --> 2018-10-13 16:02 +1100
${_formatDateTz('${ops_launch_time}', '${ops_time_zone}')} = ${_formatDateTz('2018-06-13 15:35:00 -0400', 'Europe/Berlin')} = 2018-06-13 21:35:00 +0200
</pre> |
|
|
---|
...
Description | Returns the day of week for the specified date as a number. |
---|
Syntax | ${_dayOfWeek(['date', 'first_dow', first_dow_value]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>date</code> <br>Date in any of the following formats:
<ul>
<li> date Date in any of the following formats:
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
Default is the current date.
<li> <code>first_dow</code> <br>Optional; Specification for whether the week starts on Sunday or Monday. Values are <b>sun</b> and <b>mon</b> (not - Default is the current date.
first_dow Optional; Specification for whether the week starts on Sunday or Monday. Values are sun and mon (not case-sensitive).
<li> <code>firstvalue</code> <br>Optional; Starting value for the first day of week. Value must be a non-negative number. Default is 1.
</ul>value Optional; Starting value for the first day of week. Value must be a non-negative number. Default is 1.
|
---|
Example |
Panel |
---|
Html bobswift |
---|
<pre>
${_dayOfWeek} --> 6
${_dayOfWeek()} --> 6
${_dayOfWeek('2012-07-04')} --> 4
${_dayOfWeek('2012-07-04', 'mon')} --> 3
</pre> |
|
|
---|
...
Description | Returns the number of days between date1 and date2. Html bobswift | <ul>
<li>
<li>
<li>
</ul>The start date is inclusive, but the end date is not. |
---|
Syntax | ${_daysBetween('date1', 'date2') }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>date1</code> <br>Required.
<li> <code>date2</code> <br>Required.
</ul>
date1 and date2 are specified in any of the following formats:
<ul>
<li> date1 Required.date2 Required.
date1 and date2 are specified in any of the following formats:
<li>
<li>
<li>
<li>
<li>
<li>
</ul> |
---|
Example |
Panel |
---|
Html bobswift |
---|
<pre>
${_daysBetween('2012-08-01','2012-09-01')} --> 31
</pre> |
|
|
---|
...
Description | Returns the Nth non-business day of month for the month of the date specified. Optionally, can start from the end of the month.
|
---|
Syntax | ${_nonBusinessDayOfMonth(index, ['date', 'format', reverse]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>index</code> <br>Required; Nth index Required; Nth non-business
<li> <code>date</code> <br>
<ul>
Date
<ul>
<li>
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
Default is the current date.
<li> <code>format</code> <br>Optional; Format of returned date. Default is Default is the current date.format Optional; Format of returned date. Default is yyyy-MM-dd. <code>format</code>
Html bobswift | <li> <code>reverse</code> <br>Optional; Specification (<b>true</b> or <b>false</b>) for starting from the end of the month. Default is false.
</ul>reverse Optional; Specification (true or false) for starting from the end of the month. Default is false.
|
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_nonBusinessDayOfMonth(1)} --> 2012-08-04
${_nonBusinessDayOfMonth(1,'2012-09-01')} --> 2012-09-01
${_nonBusinessDayOfMonth(1,'2012-09-01','',true)} --> 2012-09-30
</pre> |
|
|
---|
...
Description | Returns the Nth business day of month for the month of the date specified. Optionally, can start from the end of the month.
|
---|
Syntax | ${_businessDayOfMonth(index, ['date', 'format', reverse]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>index</code> <br>Required; Nth business day of month.
<li> <code>date</code> <br>
Date (and time) is specified in any of the following formats:
<ul>
<li> index Required; Nth business day of month.date Date (and time) is specified in any of the following formats:
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
Default is the current date.
<li> <code>format</code> <br>Optional; Format of returned date. Default is - Default is the current date.
format Optional; Format of returned date. Default is yyyy-MM-dd. the <code>format parameter</code>, see
Html bobswift | <li> <code>reverse</code> <br>Optional; Specification (<code>true</code> or <code>false</code>) for starting from the end of the month. Default is false.
</ul>reverse Optional; Specification (true or false ) for starting from the end of the month. Default is false.
|
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_businessDayOfMonth(1)} --> 2012-08-01
${_businessDayOfMonth(1,'2012-09-01')} --> 2012-09-04
${_businessDayOfMonth(1,'2012-09-01','',true)} --> 2012-09-28
</pre> |
|
|
---|
...
Description | Returns the Nth day of month for the month of the date specified. Optionally, can start from the end of the month. |
---|
Syntax | ${_dayOfMonth(index, ['date', 'format', reverse]) }
|
---|
Parameters | Html bobswift |
<ul>
<li> <code>index</code> <br>Required; Nth day of month.
<li> <code>date</code> <br>
Date (and time) is specified in any of the following formats:
<ul>
<li> | index Required; Nth day of month.date Date (and time) is specified in any of the following formats:
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
Default is the current date.
<li> <code>format</code> <br>Optional; Format of returned date. Default is - Default is the current date.
format Optional; Format of returned date. Default is yyyy-MM-dd.
<li> <code>reverse</code> <br>Optional; Specification (<b>true</b> or <b>false</b>) for starting from the end of the month. Default is false.
</ul>reverse Optional; Specification (true or false) for starting from the end of the month. Default is false.
|
---|
Examples |
Panel |
---|
Html bobswift |
---|
<pre>
${_dayOfMonth(5)} --> 2012-08-05
${_dayOfMonth(15,'2012-09-01','MM/dd/yyyy')} --> 09/15/2012
${_dayOfMonth(1,'2012-09-01','',true)} --> 2012-09-30
</pre> |
|
|
---|
...
Description | Returns the number of business days between date1 and date2. html-bobswift<ul>
<li> <code>date2</code> <code>date1</code>.
<li> If return value is < 0, <code>date2</code> is before <code>date1</code>.
<li> If return value is 0, <code>date1</code> is equal to <code>date2</code>.
</ul>-
date1 . - If return value is < 0,
date2 is before date1 . - If return value is 0,
date1 is equal to date2 .
The start date is inclusive, but the end date is not.
|
---|
Syntax | ${_businessDaysBetween('date1', 'date2') }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>date1</code> <br>Required.
<li> <code>date2</code> <br>Required.
</ul>
date1 and date2 are specified in any of the following formats:
<ul>
<li> date1 Required.date2 Required.
date1 and date2 are specified in any of the following formats:
<li>
<li>
<li>
<li>
<li> SSS
<li>
</ul> |
---|
Example |
Panel |
---|
Html bobswift |
---|
<pre>
${_businessDaysBetween('2012-08-01','2012-09-01')} --> 23
</pre> |
|
|
---|
...
Description | Escapes the characters in a variable value using XML entities. |
---|
Syntax | ${_varEscapeXml('variableName') }
|
---|
Parameters | variableName Required; Name of the variable being passed into the function. The variable value will be escaped for insertion into XML.
|
---|
Example | Variable Name: escape_me Variable Value: `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? Panel |
---|
Html bobswift | <pre>
${_varEscapeXml('escape_me')} --> `1234567890\E-=[]\; &apos Html bobswift |
---|
;,./ ~!@#$%^ & Html bobswift |
---|
;*()_+{}|: " Html bobswift |
---|
; < Html bobswift |
---|
; > Html bobswift |
---|
;?
</pre> |
|
---|
Anchor |
---|
| _varEscapeJson |
---|
| _varEscapeJson |
---|
|
Escape Characters in Variable Using JSON String Rules
Description | Escapes the characters in a variable value using JSON string values. |
---|
Syntax | ${_varEscapeJson('variableName') }
|
---|
Parameters | variableName Required; Name of the variable being passed into the function. The variable value will be escaped for insertion into JSON.
|
---|
Example | Variable Name: escape_me Variable Value: `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? Panel |
---|
Html bobswift | <pre>
${_varEscapeJson('escape_me')} --> `1234567890\\E-=[]\\;',.\/ ~!@#$%^&*()_+{}|:\" <> Html bobswift |
---|
?
</pre> |
|
---|
Anchor |
---|
| _varEscapeJavaScript |
---|
| _varEscapeJavaScript |
---|
|
Escape Characters in Variable Using JavaScript String Rules
Description | Escapes the characters in a variable value using JavaScript String rules. |
---|
Syntax | ${_varEscapeJavaScript('variableName') }
|
---|
Parameters | variableName Required; Name of the variable being passed into the function. The variable value will be escaped for insertion into JavaScript.
|
---|
Example | Variable Name: escape_me Variable Value: `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? Panel |
---|
Html bobswift | <pre>
${_varEscapeJavaScript('escape_me')} --> `1234567890\\E-=[]\\;\',.\/ ~!@#$%^&*()_+{}|:\" <> Html bobswift |
---|
?
</pre> |
|
---|
Anchor |
---|
| _varEscapeHtml |
---|
| _varEscapeHtml |
---|
|
Escape Characters in Variable Using HTML Entities
Description | Escapes the characters in a variable value using HTML entities. (Supports all known HTML 4.0 entities.) |
---|
Syntax | ${_varEscapeHtml('variableName') }
|
---|
Parameters | variableName Required; Name of the variable being passed into the function. The variable value will be escaped for insertion into HTML.
|
---|
Example | Variable Name: escape_me Variable Value: `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? Panel |
---|
Html bobswift | <pre>
${_varEscapeHtml('escape_me')} --> `1234567890\E-=[]\;',./ ~!@#$%^ & Html bobswift |
---|
;*()_+{}|: " Html bobswift |
---|
; < Html bobswift |
---|
; > Html bobswift |
---|
;?
</pre> |
|
---|
Anchor |
---|
| _varLiteralPattern |
---|
| _varLiteralPattern |
---|
|
Escape Characters in Variable as a Literal Pattern
Description | Returns a literal regular expression pattern String for the value of the specified variable. This method produces a String that can be used to create a Pattern that would match the String as if it were a literal pattern. |
---|
Syntax | ${_varLiteralPattern('variableName') }
|
---|
Parameters | variableName Required; Name of the variable being passed into the function. The variable value will be escaped for insertion into a regular expression as a literal pattern.
|
---|
Example | Variable Name: escape_me Variable Value: `1234567890\E-=[]\;',./ ~!@#$%^&*()_+{}|:"<>? Panel | html-bobswift |
---|
<pre>
${_varLiteralPattern('escape_me')} --> \Q`1234567890\E\\E\Q-=[]\;',./ ~!@#$%^&*()_+{}|:" <> Html bobswift |
---|
?\E
</pre> |
|
---|
Anchor |
---|
| _randomString |
---|
| _randomString |
---|
|
Randomly Generate a String
Description | Randomly generates a String with a specified length. |
---|
Syntax | ${_randomString(length[, 'excludeCharacters', 'defaultCharacters']) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>length</code><br>
<li> <code>excludeCharacters</code><br>
excludeCharacters Optional;
<li> <code>defaultCharacters</code><br>
defaultCharacters Optional;
</ul> Note |
---|
| The following characters are included in the default character set, in addition to the space character. Html bobswift |
---|
<br>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890`-=~!@#$%^&*()_+[]\{}|;':",./ |
<> ${_randomString(24, '', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@#$%*')} --> 5*L8T1RN#$AQWEKPA@BQ19JD |
|
---|
Example |
Panel |
---|
Html bobswift |
---|
<pre>
${_randomString(24, '', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@#$%*')} --> 5*L8T1RN#$AQWEKPA@BQ19JD
</pre> |
|
|
---|
...
Description | Returns the index within the string value of the first occurrence of the specified substring, str . |
---|
Syntax | ${_indexOf('value', 'str') }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>value</code> <br>Any string.
<li> <code>str</code> <br>Substring to search for. If the <code>str</code> argument occurs as a substring within the value, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
</ul>value Any string.str Substring to search for. If the str argument occurs as a substring within the value, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
|
---|
Return Index of Substring in String Variable
Description | Returns the index within the string variable of the first occurrence of the specified substring, str . |
---|
Syntax | ${_varIndexOf('variableName', 'str') }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>variableName</code> <br>Required; Name of the variable being passed into the function.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs as a substring within the variable, the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
</ul>variableName Required; Name of the variable being passed into the function.str Required; Substring to search for. If the str argument occurs as a substring within the variable, the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
|
---|
Anchor |
---|
| _indexOfWithOffset |
---|
| _indexOfWithOffset |
---|
|
Return Index of Substring Plus Offset in String Value
Description | Returns the index within this string of the first occurrence of the specified substring plus the specified offset. The integer returned is the smallest value. |
---|
Syntax | ${_indexOfWithOffset('value', 'str', offset) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>value</code> <br>Required; Any string.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs as a substring within the value, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
<li> <code>offset</code> <br>Required; Number (positive or negative) to offset the found index.
</ul>value Required; Any string.str Required; Substring to search for. If the str argument occurs as a substring within the value, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.offset Required; Number (positive or negative) to offset the found index.
|
---|
Anchor |
---|
| _varIndexOfWithOffset |
---|
| _varIndexOfWithOffset |
---|
|
Return Index of Substring Plus Offset in String Variable
Description | Returns the index within this string of the first occurrence of the specified substring plus the specified offset. The integer returned is the smallest variable. |
---|
Syntax | ${_varIndexOfWithOffset('variableName', 'str', offset) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>variableName</code> <br>Required; Name of the variable being passed into the function.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs as a substring within the variable, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
<li> <code>offset</code> <br>Required; Number (positive or negative) to offset the found index.
</ul>variableName Required; Name of the variable being passed into the function.str Required; Substring to search for. If the str argument occurs as a substring within the variable, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.offset Required; Number (positive or negative) to offset the found index.
|
---|
Return Index of Rightmost Occurrence of Substring in String Value
Description | Returns the index within the string value of the rightmost occurrence of the specified substring, str . |
---|
Syntax | ${_lastIndexOf('value', 'str') }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>value</code> <br>Required; Any string.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs one or more times as a substring within the value, then the index of the first character of the last such substring is returned. If it does not occur as a substring, -1 is returned.
</ul>value Required; Any string.str Required; Substring to search for. If the str argument occurs one or more times as a substring within the value, then the index of the first character of the last such substring is returned. If it does not occur as a substring, -1 is returned.
|
---|
Anchor |
---|
| _varLastIndexOf |
---|
| _varLastIndexOf |
---|
|
Return Index of Rightmost Occurrence of Substring in String Variable
Description | Returns the index within the string variable of the rightmost occurrence of the specified substring, str . |
---|
Syntax | ${_varLastIndexOf('variableName', 'str') }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>variableName</code> <br>Required; Name of the variable being passed into the function.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs one or more times as a substring within the variable, then the index of the first character of the last such substring is returned. If it does not occur as a substring, -1 is returned.
</ul>variableName Required; Name of the variable being passed into the function.str Required; Substring to search for. If the str argument occurs one or more times as a substring within the variable, then the index of the first character of the last such substring is returned. If it does not occur as a substring, -1 is returned.
|
---|
Anchor |
---|
| _lastIndexOfWithOffset |
---|
| _lastIndexOfWithOffset |
---|
|
Return Index of Rightmost Occurrence of Substring Plus Offset in String Value
Description | Returns the index within this string of the rightmost occurrence of the specified substring, plus the specified offset. The returned index is the largest value. |
---|
Syntax | ${_lastIndexOfWithOffset('value', 'str', offset) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>value</code> <br>Required; Any string.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs as a substring within the value, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
<li> <code>offset</code> <br>Required; Number (positive or negative) to offset the found index.
</ul>value Required; Any string.str Required; Substring to search for. If the str argument occurs as a substring within the value, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.offset Required; Number (positive or negative) to offset the found index.
|
---|
Anchor |
---|
| _varLastIndexOfWithOffset |
---|
| _varLastIndexOfWithOffset |
---|
|
Return Index of Rightmost Occurrence of Substring Plus Offset in String Variable
Description | Returns the index within this string of the rightmost occurrence of the specified substring, plus the specified offset. The returned index is the largest variable. |
---|
Syntax | ${_varLastIndexOfWithOffset('variableName', 'str', offset) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>variableName</code> <br>Required; Name of the variable being passed into the function.
<li> <code>str</code> <br>Required; Substring to search for. If the <code>str</code> argument occurs as a substring within the variable, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
<li> <code>offset</code> <br>Required; Number (positive or negative) to offset the found index.
</ul>variableName Required; Name of the variable being passed into the function.str Required; Substring to search for. If the str argument occurs as a substring within the variable, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.offset Required; Number (positive or negative) to offset the found index.
|
---|
Return Length of Value
...
Description | Returns the length of variableName . |
---|
Syntax | ${_varLength('variableName'[, useEmptyForUndefined]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>variableName</code> <br>
<li> <code>useEmptyForUndefined</code> <br>
useEmptyForUndefined Optional; <b>true</b> or <b>false</b>) for the handling of a missing variable name. Default is false.
<ul>
<li> If <code>useEmptyForUndefined</code> = <b>true</b>, the function will return 0.
<li> If <code>useEmptyForUndefined</code> = <b>false</b>, the function will remain unresolved if the variable name does not exist.
</ul> </ul> - true or false) for the handling of a missing variable name. Default is false.
- If
useEmptyForUndefined = true, the function will return 0. - If
useEmptyForUndefined = false, the function will remain unresolved if the variable name does not exist.
|
---|
Return New String that is Substring of Value
Description | Returns a new string that is a substring of value . The substring begins at beginIndex and extends to the character at endIndex -1. |
---|
Syntax | ${_substring('value', beginIndex[, endIndex]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>value</code> <br>
<li> <code>beginIndex</code> <br>
<li> <code>endIndex</code> <br>
</ul> |
---|
Example |
Panel |
---|
Html bobswift |
---|
<pre>
${_substring('hamburger', 4, 8)} --> urge
${_substring('smiles', 1, 5)} --> mile
</pre> |
|
|
---|
...
Description | Returns a new string that is a substring of variableName . The substring begins at beginIndex and extends to the character at endIndex -1. |
---|
Syntax | ${_varSubstring('variableName', beginIndex[, endIndex]) }
|
---|
Parameters | Html bobswift | <ul>
<li> <code>variableName</code> <br>
<li> <code>beginIndex</code> <br>
<li> <code>endIndex</code> <br>
</ul> |
---|
Examples | If the value of the food variable is hamburger, and the value of the face variable is smiles: Panel |
---|
Html bobswift |
---|
<pre>
${_varSubstring('food', 4, 8)} --> urge
${_varSubstring('face', 1, 5)} --> mile
</pre> |
|
|
---|
...