Public Function StringToVariantVector( _ ByRef rLines() As Variant _ , ByVal vFromLine As Variant _ , Optional ByVal vSeparator As Variant _ , Optional ByVal vCompare As Variant _ ) As Boolean
Assuming Dim avarColumns() As Variant for example StringToVariantVector(avarColumns(), "Car|Train|Plane", "|") = True leaves LBound(avarColumns) = 0 UBound(avarColumns) = 3 IsEmpty(avarColumns(0)) = True avarColumns(1) = "Car" avarColumns(2) = "Train" avarColumns(3) = "Plane"Example #2:
Assuming Dim avarColumns() As Variant for example StringToVariantVector(avarColumns(), "Car|Train|Plane", "+") = True leaves LBound(avarColumns) = 0 UBound(avarColumns) = 1 IsEmpty(avarColumns(0)) = True avarColumns(1) = "Car|Train|Plane"Example #3:
Assuming Dim avarColumns() As Variant for example StringToVariantVector(avarColumns(), Null, "|") = False leaves LBound(avarColumns) = 0 UBound(avarColumns) = 0 IsEmpty(avarColumns(0)) = TrueSee also:
Split Function (Visual Basic) StringToVariantMatrix Function VariantVectorToString Function (inverse) GetToken Function, et. al.rTo: Dynamic, one-dimensional Variant array that will receive the parts of the string vFm. rTo must be dynamic so that this function can re-dimension it appropriately. rTo need not be initialized (with ReDim) before being passed to this function.
Copyright © 1999-2005 Entisoft