Reference:Java.lang.CharSequence
From Triled Wiki
java.lang
public interface java.lang.CharSequence
| java.lang.CharSequence |
Contents |
[edit] Known Indirect Subclasses
AlteredCharSequence, CharBuffer, Editable, GetChars, Spannable, SpannableString, SpannableStringBuilder, Spanned, SpannedString, String, StringBuffer, StringBuilder
[edit] Summary
[edit] Public Methods
| char | charAt (int index) | ||||
| Answers the character at the specified index (0-based indexing). | |||||
| int | length () | ||||
| Answers the number of characters in the sequence. | |||||
| CharSequence | subSequence (int start, int end) | ||||
| Answers a CharSequence from the start index to the end index of this sequence. | |||||
| String | toString () | ||||
| Answers a String with the same characters and ordering of this CharSequence | |||||
[edit] Details
[edit] Public Methods
[edit] public char charAt(int index)
Answers the character at the specified index (0-based indexing).
Parameters
| index |
|---|
Returns
- character indicated by index
Throws
| IndexOutOfBoundsException | when index < 0 or index >= the length of the CharSequence |
|---|
[edit] public int length()
Answers the number of characters in the sequence.
Returns
- the number of charcters in the sequence
[edit] public CharSequence subSequence(int start, int end)
Answers a CharSequence from the start index to the end index of this sequence.
Parameters
| start |
|---|
| end |
Returns
- the sub sequence from start to end
Throws
| IndexOutOfBoundsException | when 1. either index is below 0 2. either index >= this.length()3. start > end |
|---|
[edit] public String toString()
Answers a String with the same characters and ordering of this CharSequence
Returns
- a String based on the CharSequence
[edit] References
- Original documentation page for Android SDK build m5-rc15e - 14 apr 2008 17:27
