# ListDeleteAt

Deletes an element from a list.

Returns a copy of the list, without the specified element.

## Method Signature

```
ListDeleteAt(list=[string], position=[integer], delimiter=[string], includeEmptyFields=[boolean], multiCharacterDelimiter=[boolean])
```

### Arguments

| Argument                  | Type      | Required | Description                                                     | Default |
| ------------------------- | --------- | -------- | --------------------------------------------------------------- | ------- |
| `list`                    | `string`  | `true`   | The list to delete from.                                        |         |
| `position`                | `integer` | `true`   | The one-based index position of the element to delete.          |         |
| `delimiter`               | `string`  | `false`  | The delimiter used in the list.                                 | `,`     |
| `includeEmptyFields`      | `boolean` | `false`  | Whether to include empty fields in the list.                    | `false` |
| `multiCharacterDelimiter` | `boolean` | `false`  | <p>Whether the delimiter is a multi-character<br>delimiter.</p> | `false` |

## Examples

### Simple Example

Deletes 2nd item from the list

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

```java
listDeleteAt( "foo,bar,lorem,ipsum", 2 );

```

Result: foo,lorem,ipsum

### Example with Custom Delimiter

Deletes 2nd item from the list using a custom delimiter

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

```java
listDeleteAt( "foo,bar|lorem,ipsum|me|something", 2, "|" );

```

Result: foo,bar|me|something

### Additional Examples

[Run Example](https://try.boxlang.io/?code=eJxtjsEKgkAQhu%2F7FIMnhSEPdZMOgQlC0aUXqO0PF1Zd3Nns8VutICGYyzD%2FfP83DkZwCuKCpGSNlxIWgl3ckppt%2FwDboAEWeKmMRcK0oYyygvKc9k8HLbhRPxPo90PF%2BxHtFQNVodNi%2Bk55GQ6xg7aUnBvjOc6FpXnT%2BT7hCzVOSmVoXUqf%2FGoptp771T%2BBL3XBVC%2FKX00I)

```java
writeOutput( listDeleteAt( "I,love,boxlang,testFile", 4 ) ); // Expected output I,love,boxlang
// Member Function
strList = "This,is,a,the,test,file";
writeDump( strList.listDeleteAt( 3 ) );
 // Expected output This,is,the,test,file

```

## 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)
* [ListChangeDelims](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listchangedelims)
* [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)
* [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)
