GetField
Syntax
GetField(string, segment, delimiter)
Description
GetField returns the substring from a specified segment of a character-delimited text string.
Parameters
| Parameter | Description |
|---|---|
|
string |
A character-delimited text string. |
|
segment |
An integer specifying which segment of the string will be returned, counting left to right. Specify a negative integer to count right to left. |
|
delimiter |
The character that delimits each segment in the string. |
Returns
Returns the substring between the delimiters in the specified segment of the string.
Example
The following table presents examples of using GetField.
| Expression | Result |
|---|---|
|
GetField(''a/b/c''| 1| ''/'') |
a |
|
GetField(''a/b/c''| 2| ''/'') |
b |
|
GetField(''a/b/c''| 5| ''/'') |
blank |
|
GetField(''a/b/c''| -1| ''/'') |
c |