Function joinToString
- join
To <T>(array, selector, options?): stringString Type Parameters
Parameters
- array: Iterable<T, any, any>
The array to join elements from.
- selector: ((el: T) => string)
The function to transform elements to strings.
- (el): string
Parameters
- el: T
Returns string
- options: Readonly<JoinToStringOptions> = {}
The options to configure the joining.
Returns string
The resulting string.
- array: Iterable<T, any, any>
Transforms the elements in the given array to strings using the given selector. Joins the produced strings into one using the given
separatorand applying the givenprefixandsuffixto the whole string afterwards.If the array could be huge, you can specify a non-negative value of
limit, in which case only the firstlimitelements will be appended, followed by thetruncatedstring.