Name
Join Function
Class
Microsoft.VisualBasic.Strings
Syntax
result = Join(sourcearray, [delimiter])-
sourcearray Use: Required
Data Type: String or Object array
Array whose elements are to be concatenated
-
delimiter Use: Optional
Data Type: String
Character used to delimit the individual values in the string
Return Value
String
Description
Concatenates an array of values into a delimited string using a specified delimiter
Rules at a Glance
If no delimiter is specified, the space character is used as a delimiter.
If you want to concatenate numeric or other nonstring values in
sourcearray, use an Object array. If, for example, you specify a numeric data type forsourcearray, the function will generate a compiler error.
Programming Tips and Gotchas
The Join function is ideal for quickly and
efficiently writing out a comma-delimited text file from an array of
values.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access