Page Summary
-
GetCharsinterface provides an efficient way to extract characters from aCharSequence, improving performance over repeatedcharAt()calls. -
Implement this interface if your custom
CharSequencehas agetChars()method for faster character extraction. -
This interface is implemented by key Android classes like
Editable,SpannableString,SpannableStringBuilder, andSpannedStringfor optimized character access. -
The primary method,
getChars(), allows copying a range of characters to a destination array, similar to the functionality in theStringclass.
| Known Indirect Subclasses |
Please implement this interface if your CharSequence has a getChars() method like the one in String that is faster than calling charAt() multiple times.
Public Method Summary
| 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. |
Inherited Method Summary
Public Methods
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.
Parameters
| start | |
|---|---|
| end | |
| dest | |
| destoff |