var
StringBuffer
=
Class.create();
StringBuffer.prototype = {
initialize : function (string) {
this ._strings = [];
this .append(string);
},
append : function (string) {
if (string != undefined) {
this ._strings.push(string);
}
return this ;
},
toString : function (separator) {
return this ._strings.join(separator || "" );
}
}
StringBuffer.prototype = {
initialize : function (string) {
this ._strings = [];
this .append(string);
},
append : function (string) {
if (string != undefined) {
this ._strings.push(string);
}
return this ;
},
toString : function (separator) {
return this ._strings.join(separator || "" );
}
}
前提是要引用prototype包