This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
collection.join( )
|
collection.join ( delimiter {; option} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
delimiter | Text |
![]() |
Separator to use between elements | |||||
option | Longint |
![]() |
ck ignore null or empty: ignore null and empty strings in the result | |||||
Function result | Text |
![]() |
String containing all elements of the collection, separated by delimiter | |||||
The collection.join( ) method converts all elements of the collection to strings and concatenates them using the specified delimiter string as separator. The method returns the resulting string.
Note: This method does not modify the original collection.
By default, null or empty elements of the collection are returned in the resulting string. Pass the ck ignore null or empty constant in the option parameter if you want to remove them from the resulting string.
C_COLLECTION($c)
C_TEXT($t1;$t2)
$c:=New collection(1;2;3;"Paris";Null;"";4;5)
$t1:=$c.join("|") //1|2|3|Paris|null||4|5
$t2:=$c.join("|";ck ignore null or empty) //1|2|3|Paris|4|5
Product: 4D
Theme: Collections
Number:
805266
Created: 4D v16 R6
4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)