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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/list/listdeleteat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
