Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/text/GetChars#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/text/GetChars#inhmethods)

# GetChars

*** ** * ** ***

` public interface GetChars `   
` implements https://developer.android.com/reference/java/lang/CharSequence `

|---|
| android.text.GetChars |

Known indirect subclasses [AlteredCharSequence](https://developer.android.com/reference/android/text/AlteredCharSequence), [Editable](https://developer.android.com/reference/android/text/Editable), [SpannableString](https://developer.android.com/reference/android/text/SpannableString), [SpannableStringBuilder](https://developer.android.com/reference/android/text/SpannableStringBuilder), [SpannedString](https://developer.android.com/reference/android/text/SpannedString) [AlteredCharSequence](https://developer.android.com/reference/android/text/AlteredCharSequence) *This class was deprecated in API level 30. The functionality this class offers is easily implemented outside the framework.* [Editable](https://developer.android.com/reference/android/text/Editable) This is the interface for text whose content and markup can be changed (as opposed to immutable text like Strings). [SpannableString](https://developer.android.com/reference/android/text/SpannableString) This is the class for text whose content is immutable but to which markup objects can be attached and detached. [SpannableStringBuilder](https://developer.android.com/reference/android/text/SpannableStringBuilder) This is the class for text whose content and markup can both be changed. [SpannedString](https://developer.android.com/reference/android/text/SpannedString) This is the class for text whose content and markup are immutable.   

*** ** * ** ***

Please implement this interface if your CharSequence has a getChars() method like the one in String that is faster than calling charAt() multiple times.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/text/GetChars#getChars(int,%20int,%20char[],%20int)(int start, int end, char[] dest, int destoff) ` Exactly like String.getChars(): copy chars `start` through `end - 1` from this CharSequence into `dest` beginning at offset `destoff`. |

### Inherited methods

From interface ` https://developer.android.com/reference/java/lang/CharSequence ` ` abstract char` ` https://developer.android.com/reference/java/lang/CharSequence#charAt(int)(int index) `

Returns the `char` value at the specified index.
` default https://developer.android.com/reference/java/util/stream/IntStream` ` https://developer.android.com/reference/java/lang/CharSequence#chars()() `

Returns a stream of `int` zero-extending the `char` values from this sequence.
` default https://developer.android.com/reference/java/util/stream/IntStream` ` https://developer.android.com/reference/java/lang/CharSequence#codePoints()() `

Returns a stream of code point values from this sequence.
` static int` ` https://developer.android.com/reference/java/lang/CharSequence#compare(java.lang.CharSequence,%20java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence cs1, https://developer.android.com/reference/java/lang/CharSequence cs2) `

Compares two `CharSequence` instances lexicographically.
` default void` ` https://developer.android.com/reference/java/lang/CharSequence#getChars(int,%20int,%20char[],%20int)(int srcBegin, int srcEnd, char[] dst, int dstBegin) `

Copies characters from this sequence into the given destination array.
` default boolean` ` https://developer.android.com/reference/java/lang/CharSequence#isEmpty()() `

Returns `true` if this character sequence is empty.
` abstract int` ` https://developer.android.com/reference/java/lang/CharSequence#length()() `

Returns the length of this character sequence.
` abstract https://developer.android.com/reference/java/lang/CharSequence` ` https://developer.android.com/reference/java/lang/CharSequence#subSequence(int,%20int)(int start, int end) `

Returns a `CharSequence` that is a subsequence of this sequence.
` abstract https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/CharSequence#toString()() `

Returns a string containing the characters in this sequence in the same order as this sequence.

## Public methods

### getChars

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void getChars (int start, 
                int end, 
                char[] dest, 
                int destoff)
```

Exactly like String.getChars(): copy chars `start` through `end - 1` from this CharSequence into `dest` beginning at offset `destoff`.

<br />

| Parameters ||
|---|---|
| `start` | `int`: start copying at this offset. <br /> |
| `end` | `int`: stop copying at this offset. <br /> |
| `dest` | `char`: the array to copy the data into. <br /> |
| `destoff` | `int`: offset into `dst`. <br /> |