# AnnotatedString.Range

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/AnnotatedString.kt+class:androidx.compose.ui.text.AnnotatedString.Range) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  data class AnnotatedString.Range<T : Any?>
  ```

*** ** * ** ***

The information attached on the text such as a `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/SpanStyle`.

## Summary

| ### Public constructors |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#Range(kotlin.Any,kotlin.Int,kotlin.Int)(item: T, start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` | Cmn |
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#Range(kotlin.Any,kotlin.Int,kotlin.Int,kotlin.String)(item: T, start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, tag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#end()` The end of the range where `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` takes effect. | Cmn |
| `T` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` The object attached to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString`s. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#start()` The start of the range where `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` takes effect. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#tag()` The tag used to distinguish the different ranges. | Cmn |

## Public constructors

### Range

Cmn

```
<T : Any?> Range(item: T, start: Int, end: Int)
```

### Range

Cmn

```
<T : Any?> Range(item: T, start: Int, end: Int, tag: String)
```

| Parameters |
|---|---|
| `item: T` | The object attached to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString`s. |
| `start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The start of the range where `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` takes effect. It's inclusive |
| `end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The end of the range where `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` takes effect. It's exclusive |
| `tag: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The tag used to distinguish the different ranges. It is useful to store custom data. And `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range`s with same tag can be queried with functions such as `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString#getStringAnnotations(kotlin.String,kotlin.Int,kotlin.Int)`. |

## Public properties

### end

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val end: Int
```

The end of the range where `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` takes effect. It's exclusive

### item

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val item: T
```

The object attached to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString`s.

### start

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val start: Int
```

The start of the range where `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range#item()` takes effect. It's inclusive

### tag

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val tag: String
```

The tag used to distinguish the different ranges. It is useful to store custom data. And `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range`s with same tag can be queried with functions such as `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString#getStringAnnotations(kotlin.String,kotlin.Int,kotlin.Int)`.