4D v17.4

collection.join( )

Home

 
4D v17.4
collection.join( )

collection.join( )  


 

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.

Example  

 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



See also 

Split string

 
PROPERTIES 

Product: 4D
Theme: Collections

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v17)
4D Language Reference ( 4D v17.1)
4D Language Reference ( 4D v17.2)
4D Language Reference ( 4D v17.3)
4D Language Reference ( 4D v17.4)