# joinToString

Source: https://taxilang.org/docs/language/stdlib/joinToString

**Full name:** `taxi.stdlib.joinToString`

## Signature

```taxi
declare extension function <T> joinToString(values:T[], separator: String = ",", prefix: String? = null, postfix: String? = null): String
```

## Description

Creates a string from all the elements separated using `separator` and using the given `prefix` and `postfix` if supplied. Null values are omitted.

```taxi
find { order: Order } as {
   tagList: String = order.tags.joinToString(', ')
}
```

## Examples

Joins array elements into a single string, with optional separator, prefix, and postfix.

Query:

```taxi
given {
   tags: String[] = ['alpha', 'beta', 'gamma']
}
find {
   joined: String = tags.joinToString(', ')
   withBrackets: String = tags.joinToString(', ', '[', ']')
}
```

Result:

```json
{
  "joined": "alpha, beta, gamma",
  "withBrackets": "[alpha, beta, gamma]"
}
```
