javaprims.h: Updated.
* gcj/javaprims.h: Updated. * java/lang/String.java (String(StringBuilder)): New constructor. * java/lang/natStringBuilder.cc: New file. * java/lang/StringBuilder.java: New file. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added StringBuilder.java. (nat_source_files): Added natStringBuilder.cc. From-SVN: r99535
This commit is contained in:
parent
aeddae499f
commit
0cb757cc06
7 changed files with 1018 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
/* String.java -- immutable character sequences; the object of string literals
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
@ -397,6 +397,18 @@ public final class String implements Serializable, Comparable, CharSequence
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new String using the character sequence represented by
|
||||
* the StringBuilder. Subsequent changes to buf do not affect the String.
|
||||
*
|
||||
* @param buffer StringBuilder to copy
|
||||
* @throws NullPointerException if buffer is null
|
||||
*/
|
||||
public String(StringBuilder buffer)
|
||||
{
|
||||
this(buffer.value, 0, buffer.count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Special constructor which can share an array when safe to do so.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue