Skip to main content

Join-Array-into-String

Command Description

Join an array into a string and use the specified separator to separate elements in the array

Command Prototype

sRet = Join(arrData,sSeparator)

Parameter Description

ParameterRequiredTypeDefaultDescription
arrDataTrueexpression[]The array to be merged
sSeparatorTruestring","The separator to be used to join the array

return

sRet,The variable used to save the output of the command.

Demo

TracePrint("----------------------Merge arrays into strings------------------- -----") 
//-------------------------------------------------------------------------------
//[Remarks] Concatenate the array into a string, and use the specified delimiter to separate the array elements.
//Input parameter 1:
// arrData--array to be merged.
//Input parameter 2:
// sSeparator--The separator used when merging arrays.
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//
//Command prototype: sRet=Join(arrData,sSeparator)
//-------------------------------------------------------------------------------
sRet = Join (["RPA", "UiBot"], ",")
TracePrint (sRet)