joinWith()
joinWith(
strArr
,joinChar
):string
Joins an array of strings using the given character (see defaultJoinChar. When the given character appears in an array element, a backslash will be added just before it to distinguish it from the join character. Inverse of splitBy.
Parameters
Parameter | Type | Default value |
---|---|---|
strArr | any [] | undefined |
joinChar | string | defaultJoinChar |
Returns
string
Example
joinWith(['this,,that', '', 'the other', '', '', ','])
// would return
'this\\,\\,that,,the other,,,\\,'
Source
packages/react-querybuilder/src/utils/arrayUtils.ts:43
caution
API documentation is generated from the latest commit on the main
branch. It may be somewhat inconsistent with official releases of React Query Builder.