Split Function (VB6) |
No
Split (expression, [delimiter[, count[, compare]]])
expression
Use: Required
Data Type: String
A string to be broken up into multiple strings.
delimiter
Use: Optional
Data Type: Variant
The character used to delimit the substrings in expression.
count
use: Optional
Data Type: Long
The number of strings to return.
compare
Use: Optional
Data Type: VbCompareMethod constant
The method of comparison. Possible values are vbBinaryCompare, vbTextCompare, or vbDatabaseCompare.
A variant array consisting of the arguments passed into the function.
Parses a single string containing delimited values into an array
The returned array is always base regardless of any Option Base setting.
If delimiter isn't found in expression, Split returns the entire string in element of the return array.
If delimiteris omitted, a space character (" ") is used as the delimiter.
If count is omitted or its value is –1, all strings are returned.
The default comparison method is vbBinaryCompare.
Once count has been reached, the remainder of the string is placed, unprocessed, into the next element of the returned array.
The array you declare to assign the return value of Split must be a dynamic, single-dimension string array, or a variant.
Strings are written to the returned array in the order in which they appear in expression.