Documentation
This section contains the intrinsic functions that are used for working together with string values.
Returns the one-based position of the first occurrence of one string within another. If the substring is not found then zero is returned.
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result will be .inf, unless the second parameter is
.nul |
string
| The string to find the substring in |
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result will be .inf, unless the first parameter is
.nul |
string
| The substring to search for. If this is the empty string then the return
value will be 0, unless the first parameter is .nul or
.inf
|
Compares a string with a pattern and returns .true if the string
matches the pattern, or .false otherwise.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| None |
string
| The string to test against the pattern. | |
| None |
string
| The pattern to test the string against. The string is matched against the
pattern on a character by character basis, with the exception of the * wildcard
described below. The string is considered to match the pattern is every character
in it is matched by the characters in the pattern, and neither has any characters
in excess. Matching can be performed either in a case sensitive mode, or a case
insensitive mode. With the exception of the special pattern characters described
below, a character in the string matches a character in the pattern if either the
characters are the same, or if case insensitive testing is being done and the
characters are the same when converted to lower case. The special pattern
characters are:
|
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result will be .inf, unless the second parameter is
.nul |
string
| The string to extract the beginning characters from |
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result is the whole first parameter |
integer
| The number of characters to extract. If this is negative no characters are returned. If it is greater than the length of the string then the whole string is returned |
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result will be .inf, unless the second parameter is
.nul |
string
| The string to extract the ending characters from |
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result is the whole first parameter |
integer
| The number of characters to extract. If this is negative no characters are returned. If it is greater than the length of the string then the whole string is returned |
Extracts characters a specified number of characters from a specified position in a string
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| The result will be .inf, unless another parameter is
.nul |
string
| The string to extract characters from |
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| If the result will be a string, then it will be the empty string, ie. the function behaves as if character extraction starts at the end of the string. |
integer
| The one-based position to start extracting characters from. If this is zero or negative then the start position is the start of the string. If it is greater than the length of the string then an empty string is returned. |
| Type name | Result for an expression of this type in this parameter |
|---|---|
.nul
| The result will be .nul |
.inf
| If the result is a string then all characters to the end of the string are extracted |
integer
| The number of characters to extract. If this is negative no characters are returned. If it is greater than the length from the start of the extraction to the end of the string then characters up to the end of the string are returned. |



