I have been trying to create a function in Foundry that will take n number of parameters and concatenate the strings with a given delimiter.
When using a rest parameter, the input defaults to requiring data type array, not string. It also only accepts one array as an input parameter, not multiple string values:
Example function:
@Function()
public stringAppendFunction(delimiter: string, ...names: string[]): string{
let output = names.join(delimiter)
return output
}
Within Foundry, the function above ends up only having two inputs: delimiter (string) and names (array).
Does anyone have any working functions in Foundry with n number of input parameters?