# ListChangeDelims

Converts the delimiters of a list to the new delimiter.

## Method Signature

```
ListChangeDelims(list=[string], newDelimiter=[string], delimiter=[string], includeEmptyFields=[boolean], multiCharacterDelimiter=[boolean])
```

### Arguments

| Argument                  | Type      | Required | Description                                                    | Default |
| ------------------------- | --------- | -------- | -------------------------------------------------------------- | ------- |
| `list`                    | `string`  | `true`   | string list to convert the delimiters.                         |         |
| `newDelimiter`            | `string`  | `true`   | string the new list delimiter                                  |         |
| `delimiter`               | `string`  | `false`  | string the old list delimiter                                  | `,`     |
| `includeEmptyFields`      | `boolean` | `false`  | boolean whether to include empty fields in the returned result | `false` |
| `multiCharacterDelimiter` | `boolean` | `false`  |                                                                | `false` |

## Examples

### Simple Example

Changes the delimiters in the list

[Run Example](https://try.boxlang.io/?code=eJzLySwucc5IzEtPdUnNycwt1lBQSsvP10lKLNLJyS9KzdXJLCguzVXSUVCqUVLQtOYCAKkAD9E%3D)

```java
listChangeDelims( "foo,bar,lorem,ipsum", "|" );

```

Result: foo|bar|lorem|ipsum

### Example with Custom Delimiter

Changes the delimiters in the list using a custom delimiter

[Run Example](https://try.boxlang.io/?code=eJzLySwucc5IzEtPdUnNycwt1lBQSsvP10lKLKrJyS9KzdXJLCguza3JTa0pzs9NLcnIzEtX0lFQqgMRNUoKmtZcADvdFsc%3D)

```java
listChangeDelims( "foo,bar|lorem,ipsum|me|something", "~", "|" );

```

Result: foo,bar~~lorem,ipsum~~me\~something

### Additional Examples

[Run Example](https://try.boxlang.io/?code=eJxlzssKwjAUhOF9n2LIqiXB4GVXBMEuKwo%2BQaxHG0jSkpzY19dSceN64P9Ga1ytHx3hkUPHdgjFFC3TOfOYuURrEx97E57UkLM%2BlRAXZwKrZyQKKpkXKTKRe6EgDgIVqrrQGifyN4q%2FKCbLPbqcePC4z6WPEYvEsU2MPcRabuRW7kS98E32Y4llXrn%2FD3rm5Jd7A5D0P3A%3D)

```java
// Simple function
writeOutput( ListChangeDelims( "Plant,green,save,earth", "@" ) );
// Member function with custom delimiter
strLst = "1+2+3+4";
writeDump( strLst.listChangeDelims( "/", "+" ) );

```

## Related

* [GetToken](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/gettoken)
* [ListAppend](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listappend)
* [ListAvg](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listavg)
* [ListCompact](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listcompact)
* [ListContains](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listcontains)
* [ListContainsNoCase](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listcontainsnocase)
* [ListDeleteAt](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listdeleteat)
* [ListEach](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listeach)
* [ListEvery](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listevery)
* [ListFilter](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listfilter)
* [ListFind](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listfind)
* [ListFindNoCase](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listfindnocase)
* [ListFirst](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listfirst)
* [ListGetAt](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listgetat)
* [ListGetEndings](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listgetendings)
* [ListIndexExists](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listindexexists)
* [ListInsertAt](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listinsertat)
* [ListItemTrim](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listitemtrim)
* [ListLast](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listlast)
* [ListLen](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listlen)
* [ListMap](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listmap)
* [ListNone](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listnone)
* [ListPrepend](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listprepend)
* [ListQualify](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listqualify)
* [ListReduceRight](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listreduceright)
* [ListRemoveDuplicates](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listremoveduplicates)
* [ListRest](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listrest)
* [ListSetAt](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listsetat)
* [ListSome](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listsome)
* [ListSort](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listsort)
* [ListToArray](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listtoarray)
* [ListTrim](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listtrim)
* [ListValueCount](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listvaluecount)
* [ListValueCountNoCase](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listvaluecountnocase)
