Imported GNU Classpath 0.19 + gcj-import-20051115.
* sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. From-SVN: r107049
This commit is contained in:
parent
02e549bfaa
commit
8f523f3a10
1241 changed files with 97711 additions and 25284 deletions
|
@ -463,6 +463,25 @@ public final class StringBuilder
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append the code point to this <code>StringBuilder</code>.
|
||||
* This is like #append(char), but will append two characters
|
||||
* if a supplementary code point is given.
|
||||
*
|
||||
* @param code the code point to append
|
||||
* @return this <code>StringBuilder</code>
|
||||
* @see Character#toChars(int, char[], int)
|
||||
* @since 1.5
|
||||
*/
|
||||
public synchronized StringBuilder appendCodePoint(int code)
|
||||
{
|
||||
int len = Character.charCount(code);
|
||||
ensureCapacity(count + len);
|
||||
Character.toChars(code, value, count);
|
||||
count += len;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append the <code>String</code> value of the argument to this
|
||||
* <code>StringBuilder</code>. Uses <code>String.valueOf()</code> to convert
|
||||
|
@ -704,6 +723,52 @@ public final class StringBuilder
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert the <code>CharSequence</code> argument into this
|
||||
* <code>StringBuilder</code>. If the sequence is null, the String
|
||||
* "null" is used instead.
|
||||
*
|
||||
* @param offset the place to insert in this buffer
|
||||
* @param sequence the <code>CharSequence</code> to insert
|
||||
* @return this <code>StringBuilder</code>
|
||||
* @throws IndexOutOfBoundsException if offset is out of bounds
|
||||
*/
|
||||
public synchronized StringBuilder insert(int offset, CharSequence sequence)
|
||||
{
|
||||
if (sequence == null)
|
||||
sequence = "null";
|
||||
return insert(offset, sequence, 0, sequence.length());
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a subsequence of the <code>CharSequence</code> argument into this
|
||||
* <code>StringBuilder</code>. If the sequence is null, the String
|
||||
* "null" is used instead.
|
||||
*
|
||||
* @param offset the place to insert in this buffer
|
||||
* @param sequence the <code>CharSequence</code> to insert
|
||||
* @param start the starting index of the subsequence
|
||||
* @param end one past the ending index of the subsequence
|
||||
* @return this <code>StringBuilder</code>
|
||||
* @throws IndexOutOfBoundsException if offset, start,
|
||||
* or end are out of bounds
|
||||
*/
|
||||
public synchronized StringBuilder insert(int offset, CharSequence sequence,
|
||||
int start, int end)
|
||||
{
|
||||
if (sequence == null)
|
||||
sequence = "null";
|
||||
if (start < 0 || end < 0 || start > end || end > sequence.length())
|
||||
throw new IndexOutOfBoundsException();
|
||||
int len = end - start;
|
||||
ensureCapacity(count + len);
|
||||
VMSystem.arraycopy(value, offset, value, offset + len, count - offset);
|
||||
for (int i = start; i < end; ++i)
|
||||
value[offset++] = sequence.charAt(i);
|
||||
count += len;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert the <code>char[]</code> argument into this
|
||||
* <code>StringBuilder</code>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue