DthingApi
Public Member Functions | List of all members
java.lang.CharSequence Interface Reference
Inheritance diagram for java.lang.CharSequence:
java.lang.String

Public Member Functions

int length ()
 
char charAt (int index)
 
CharSequence subSequence (int start, int end)
 
String toString ()
 

Detailed Description

This interface represents an ordered set of characters and defines the methods to probe them.

Member Function Documentation

◆ charAt()

char java.lang.CharSequence.charAt ( int  index)

Returns the character at the specified index, with the first character having index zero.

Parameters
indexthe index of the character to return.
Returns
the requested character.
Exceptions
IndexOutOfBoundsExceptionif
index < 0
or
index
is greater than the length of this sequence.

Implemented in java.lang.String.

◆ length()

int java.lang.CharSequence.length ( )

Returns the number of characters in this sequence.

Returns
the number of characters.

Implemented in java.lang.String.

◆ subSequence()

CharSequence java.lang.CharSequence.subSequence ( int  start,
int  end 
)

Returns a

CharSequence

from the

start

index (inclusive) to the

end

index (exclusive) of this sequence.

Parameters
startthe start offset of the sub-sequence. It is inclusive, that is, the index of the first character that is included in the sub-sequence.
endthe end offset of the sub-sequence. It is exclusive, that is, the index of the first character after those that are included in the sub-sequence
Returns
the requested sub-sequence.
Exceptions
IndexOutOfBoundsExceptionif
start < 0
,
end < 0
,
start > end
, or if
start
or
end
are greater than the length of this sequence.

Implemented in java.lang.String.

◆ toString()

String java.lang.CharSequence.toString ( )

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

Returns
a string based on this sequence.

Implemented in java.lang.String.


The documentation for this interface was generated from the following file: