# CharSequenceKt

Added in 1.1.0

*** ** * ** ***


```
public final class CharSequenceKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final boolean` | `https://developer.android.com/reference/androidx/core/text/CharSequenceKt#(kotlin.CharSequence).isDigitsOnly()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html receiver)` Returns whether the given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` contains only digits. |
| `static final int` | `https://developer.android.com/reference/androidx/core/text/CharSequenceKt#(kotlin.CharSequence).trimmedLength()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html receiver)` Returns the length that the specified `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` would have if spaces and ASCII control characters were trimmed from the start and end, as by `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/index.html`. |

## Public methods

### isDigitsOnly

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/text/CharSequence.kt+function:isDigitsOnly) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final boolean isDigitsOnly(@NonNull CharSequence receiver)
```

Returns whether the given `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` contains only digits.

| See also |
|---|---|
| `https://developer.android.com/reference/android/text/TextUtils.html#isDigitsOnly(java.lang.CharSequence)` |   |

### trimmedLength

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/text/CharSequence.kt+function:trimmedLength) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public static final int trimmedLength(@NonNull CharSequence receiver)
```

Returns the length that the specified `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` would have if spaces and ASCII control characters were trimmed from the start and end, as by `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.text/index.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/text/TextUtils.html#getTrimmedLength(java.lang.CharSequence)` |   |