SPLICE()

SPLICE()

Top  Previous  Next

 

The SPLICE() function concatenates corresponding elements of a dynamic array, inserting a string between each pair of items.

 

 

Format

 

SPLICE(array1, string, array2)

 

where

 

array1is the first dynamic array.

 

stringis the string to be inserted between each pair of items.

 

array2is the second dynamic array.

 

 

The SPLICE() function returns the result of concatenating corresponding dynamic array components (fields, values and subvalues) from the supplied arrays, inserting string between each pair.

 

The REUSE() function can be applied to either or both dynamic arrays. Without this function, any absent trailing values are taken as null strings.

 

 

Example

 

S1 = "ABC":@fm@"DEF"

S2 = "123":@vm:"456":@fm:"789"

X = SPLICE(S1,'-', S2)

 

The above code fragment concatenates elements of the two strings yielding a result in X of "ABC123VM456FMDEF789"