insert
Inserts the string representation of a subarray of the str
array argument into this sequence. The subarray begins at the specified offset
and extends len
char
s. The characters of the subarray are inserted into this sequence at the position indicated by index
. The length of this sequence increases by len
char
s.
Return
This object
Parameters
position at which to insert subarray.
A char
array.
the index of the first char
in subarray to be inserted.
the number of char
s in the subarray to be inserted.
Throws
if index
is negative or greater than length()
, or offset
or len
are negative, or (offset+len)
is greater than str.length
.
Inserts the string representation of the Object
argument into this character sequence.
The overall effect is exactly as if the second argument were converted to a string by the method valueOf, and the characters of that string were then inserted into this character sequence at the indicated offset.
The offset
argument must be greater than or equal to 0
, and less than or equal to the length of this sequence.
Return
a reference to this object.
Parameters
the offset.
an Object
.
Throws
if the offset is invalid.
Inserts the string representation of the Object
argument into this character sequence after applying a format call.
The overall effect is exactly as if the string was formatted using format, passed into the insert method, and then inserted into this character sequence at the indicated offset.
The offset
argument must be greater than or equal to 0
, and less than or equal to the length of this sequence.
Return
a reference to this object.
Parameters
the offset.
the format string.
the objects to insert into the string.
Throws
if the offset is invalid.