Replaces each occurrence of a specified character in the clsD3DynamicArray object with another character.
lValue = object.Convert(sFrom, sTo)
Parameter | Description |
---|---|
lValue | The return value is a Long data type indicating the total number of characters replaced. |
object | An object variable that represents a clsD3DynamicArray object. |
sFrom | A String containing the character or characters to be replaced. |
sTo | A String containing the character or characters that will replace those in sFrom. |
Any character designated in sFrom is replaced with the corresponding character from sTo.
If the length of sFrom is shorter than the length of sTo, all characters in sFrom beyond the length of sTo are ignored. If the length of sFrom is longer than the length of sTo, all characters in sFrom beyond the length of sTo are deleted from the dynamic array.
Sub Main() Dim oEnv As New clsD3Environment Dim oArray_TopSellers As New clsD3DynamicArray Dim oArray2 As clsD3DynamicArray oArray_TopSellers.brCString = "Smith" & D3AMChr & "Jones" & D3AMChr & "Green" Set oArray2 = oArray_TopSellers.brCopy ' Create a comma-delimited list. oArray2.brConvertD3AMChr, "," Debug.Print "The top sellers are " & oArray2.brCString ' Extract the 1st attribute. Debug.Print "The #1 seller is " & oArray_TopSellers.brExtract(1).brCString Set oArray_TopSellers = Nothing Set oEnv = Nothing End Sub
convert