Stay organized with collections
Save and categorize content based on your preferences.
AlteredCharSequence
open class AlteredCharSequence : CharSequence, GetChars
An AlteredCharSequence is a CharSequence that is largely mirrored from another CharSequence, except that a specified range of characters are mirrored from a different char array instead.
Summary
| Public methods |
| open Char |
|
| open Unit |
|
| open static AlteredCharSequence! |
Create an AlteredCharSequence whose text (and possibly spans) are mirrored from source, except that the range of offsets substart inclusive to subend exclusive are mirrored instead from sub, beginning at offset 0.
|
| open CharSequence |
|
| open String |
|
Public methods
get
open fun get(off: Int): Char
Deprecated: Deprecated in Java.
| Parameters |
index |
the index of the char value to be returned |
| Return |
Char |
the specified char value |
| Exceptions |
java.lang.IndexOutOfBoundsException |
if the index argument is negative or not less than length() |
getChars
open fun getChars(
start: Int,
end: Int,
dest: CharArray!,
off: Int
): Unit
Deprecated: Deprecated in Java.
make
open static fun make(
source: CharSequence!,
sub: CharArray!,
substart: Int,
subend: Int
): AlteredCharSequence!
Deprecated: Deprecated in Java.
Create an AlteredCharSequence whose text (and possibly spans) are mirrored from source, except that the range of offsets substart inclusive to subend exclusive are mirrored instead from sub, beginning at offset 0.
subSequence
open fun subSequence(
startIndex: Int,
endIndex: Int
): CharSequence
Deprecated: Deprecated in Java.
| Parameters |
start |
the start index, inclusive |
end |
the end index, exclusive |
| Exceptions |
java.lang.IndexOutOfBoundsException |
if start or end are negative, if end is greater than length(), or if start is greater than end |
toString
open fun toString(): String
Deprecated: Deprecated in Java.
| Return |
String |
a string consisting of exactly this sequence of characters |
Properties
length
open val length: Int
| Return |
Int |
the number of chars in this sequence |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[]]