---
title: "delete"
description: "Delete the text between [start] (inclusive) and [end] (exclusive). Pass 0 as [start] and
[TextFieldBuffer.length] as [end] to delete everything in this buffer."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun TextFieldBuffer.delete(start: Int, end: Int)
```


Delete the text between `start` (inclusive) and `end` (exclusive). Pass 0 as `start` and
`TextFieldBuffer.length` as `end` to delete everything in this buffer.

#### Parameters

| | |
| --- | --- |
| start | The character offset of the first character to delete. |
| end | The character offset of the first character after the deleted range. |




