|
GetField Function
Returns a substring from a source string.
SYNTAX
GetField[$]( string$ , field_number% , separator_chars$ )
Syntax
Element Description
$ Optional. If specified, the return type is String. If omitted, the function typically returns a Variant of VarType 8 (String).
string$ A list of fields, divided by separator characters.
field_number% The number of the field to return, starting with 1.
separator_chars$ The characters separating each field.
COMMENTS
If field_number is greater than the number of fields in the string, an empty string ("") is returned.
Multiple separator characters can be specified, but they can’t be used together. For example, the code in the first bullet below is correct, but the code in the second bullet retrieves an incorrect field:
· retvalue = GetField("9-8;7;6-5",3,"-;")
· retvalue = GetField("9-;8-;7-;6-;5",3,"-;") |
|