Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - Join

Posted in WinTask

'
' Join - Concatenate an array of strings,
'        inserting a separator between each
'
' Author - Joe Strazzere
'
Dim MyArray$(100)

 

MyArray$(0) = "Abc"
MyArray$(1) = "B"
MyArray$(2) = "C"
MyArray$(3) = "Defghij"

 

'
' Loop through the array, concatenating each element
' and inserting a separator
'
i=0
Result$=""
Separator$=","  ' The separator

 

While MyArray$(i) <> ""
 Result$=Result$+MyArray$(i)+Separator$
 i=i+1
Wend

 

'
' Now, remove the extra separator at the end
'
Result$=Left$(Result$,Len(Result$) - 1)

 

MsgBox(Result$)



Any comments on this article?
Email Me


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now