DWStrJoinfunction
Returns a string consisting of all of the strings in an array, each separated by a delimiter.
Parameters
| Name | Description | |
|---|---|---|
array | The one-dimensional array to join. | |
dest | The destination string. | |
delim | The delimiter character. |
Return value
A string containing the joined string.
Description
Returns a string consisting of all of the strings in an array, each separated by a delimiter. If the delimiter is a null (zero-length) string then no separators are inserted between the string sections. If the delimiter expression is the 3-byte value of '","', which may be expressed in your source code as the string literal """,""" or as Chr(34,44,34) then a leading and trailing double-quote is added to each string section. This ensures that the returned string contains standard comma-delimited quoted fields that can be easily parsed.
Examples
#macro DWStrJoin(array, dest, delim)
DIM rg(1 TO 10) AS DWSTRING FOR i AS LONG = 1 TO 10 rg(i) = "string " & i NEXT DIM dws AS DWSTRING DWStrJoin(rg, dws, """,""") PRINT dws ' Instead of DWSTRING, any other data type can be used: BSTRING, STRING...
Reference
- Include file
DWSTRProcs.inc - Documented in String Management/DWString Procedures.md
- Topic: String Procedures