Help Center

DWStrJoinfunction

Returns a string consisting of all of the strings in an array, each separated by a delimiter.

String ManagementfunctionDWSTRProcs.incdoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Parameters

NameDescription
arrayThe one-dimensional array to join.
destThe destination string.
delimThe 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