123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- goog.provide('goog.string.StringBuffer');
- goog.string.StringBuffer = function(opt_a1, var_args) {
- if (opt_a1 != null) {
- this.append.apply(this, arguments);
- }
- };
- goog.string.StringBuffer.prototype.buffer_ = '';
- goog.string.StringBuffer.prototype.set = function(s) {
- this.buffer_ = '' + s;
- };
- goog.string.StringBuffer.prototype.append = function(a1, opt_a2, var_args) {
-
- this.buffer_ += String(a1);
- if (opt_a2 != null) {
- for (var i = 1; i < arguments.length; i++) {
- this.buffer_ += arguments[i];
- }
- }
- return this;
- };
- goog.string.StringBuffer.prototype.clear = function() {
- this.buffer_ = '';
- };
- goog.string.StringBuffer.prototype.getLength = function() {
- return this.buffer_.length;
- };
- goog.string.StringBuffer.prototype.toString = function() {
- return this.buffer_;
- };
|