Text functions perform an operation on a string input value and return a string or
numeric value.
The following information describes the functions available for building
expressions.
Tip:
- Any information within square brackets [ ] is optional.
- All indexing is one-based.
- For more information on formatting strings, see Conversion
Functions.
StringLength
- Description
- Returns the number of characters int32 in a string.
- Format
- StringLength(string)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
The string to perform the operation on. |
LeftSubstring
- Description
- Returns the first (leftmost) characters from a string.
- Format
- LeftSubstring(string, nCount)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
The string to perform the operation on. |
nCount |
Yes |
Numeric |
Number of characters to retrieve. |
RightSubstring
- Description
- Returns the end (rightmost) character from a string.
- Format
- RightSubstring(string, nCount)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
The string to perform the operation on. |
nCount |
Yes |
Numeric |
Number of characters to retrieve. |
Substring
- Description
- Returns a substring of a specified length starting at the first specified
character of a string.
- Format
- Substring(string, nFirst, nCount)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
The string to perform the operation on. |
nFirst |
Yes |
Numeric |
First character of the string to retrieve (one-based index). |
nCount |
Yes |
Numeric |
Number of characters to retrieve. |
Substitute
- Description
- Replaces all instances of one substring with another in a specified string,
and returns the result as a string.
- Format
- Substitute(string, oldText, newText [, ignoreCase])
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
Original string. |
oldText |
Yes |
String |
Substring to be replaced. |
newText |
Yes |
String |
Substring that overwrites the original text. |
ignoreCase |
No |
Boolean |
True if character case should be ignored when searching the string;
otherwise, false. |
FindString
- Description
- Searches a string (from left to right) to find the first occurrence of a
given substring. Returns (Int 32) the character location of the first
occurrence of the substring in the searched string (one-based index).
Returns zero if the substring is not found.
- Format
- FindString(textToFind, textToSearch, startIndex [,
ignoreCase])
Parameters |
Required? |
Data Type |
Description |
textToFind |
Yes |
String |
Substring to search for. |
textToSearch |
Yes |
String |
String to search. |
startIndex |
Yes |
Numeric |
Location where the character search begins (one-based index). |
ignoreCase |
No |
Boolean |
True if the character case should be ignored when searching the string;
otherwise, false. |
ContainsString
- Description
- Determines whether a substring is present within a specified string, and
returns a boolean result.
- Format
- ContainsString(textToFind, textToSearch [, ignoreCase])
Parameters |
Required? |
Data Type |
Description |
textToFind |
Yes |
String |
Substring to search for. |
textToSearch |
Yes |
String |
String to search. |
ignoreCase |
No |
Boolean |
True if the character case should be ignored when searching the string;
otherwise, false. |
InsertString
- Description
- Inserts the given text into a string at a specified position, and returns
the result as a string.
- Format
- InsertString(textToInsert, string, startPosition)
Parameters |
Required? |
Data Type |
Description |
textToInsert |
Yes |
String |
String to insert |
string |
Yes |
String |
Original string. |
startPosition |
Yes |
Numeric |
Location where text is inserted into the original string (one-based
index). |
RemoveString
- Description
- Removes a portion of text from a string, and returns the result as a
string.
- Format
- RemoveString(string, startPosition, characterCount)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
Original string. |
startPosition |
Yes |
Numeric |
First character of the string to remove (one-based index). |
characterCount |
Yes |
Numeric |
Number of characters to remove. |
IsStringEqual
- Description
- Compares the text of two strings to determine if they are equal, and returns
a boolean result.
- Format
- IsStringEqual(stringA, stringB [, ignoreCase])
Parameters |
Required? |
Data Type |
Description |
stringA |
Yes |
String |
One of the strings to compare. |
stringB |
Yes |
String |
Other string to compare. |
ignoreCase |
No |
Boolean |
True if the character case should be ignored when searching the string;
otherwise, false is the default. |
ApplyMask
- Description
- Tests a string to determine if it matches a specified pattern, and returns a
boolean result. For more information, see Apply Mask
Function.
- Format
- ApplyMask(string, mask)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
Length of string to test. |
mask |
Yes |
String |
Mask string to apply. |
ToLower
- Description
- Converts all uppercase letters in a text string to lowercase, and returns
the result as a string.
- Format
- ToLower(string)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
String to convert to lowercase. |
ToUpper
- Description
- Converts all lowercase letters in a text string to uppercase, and returns
the result as a string.
- Format
- ToUpper(string)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
String to convert to uppercase. |
TrimWhitespace
- Description
- Removes all occurrences of white space characters from the beginning and end
of a string, and returns the result as a string.
- Format
- TrimWhitespace(string)
Parameters |
Required? |
Data Type |
Description |
string |
Yes |
String |
String that the whitespace is removed from. |
Split
- Description
- Splits a string into an array of strings.
- Format
- string[ ] Split(stringToSplit [, delimiterString])
Parameters |
Required? |
Data Type |
Description |
stringToSplit |
Yes |
String |
String that is converted into an array of strings. |
delimiterString |
No |
String |
Specifies the character that separates the sequence. It can be multiple
characters. |