string.StringBuffer Extends
Utility class to facilitate string concatenation.

Inheritance

Constructor

goog.string.StringBuffer(opt_a1var_args)

Parameters

opt_a1 : *=
Optional first initial item to append.
var_args : ...*
Other initial items to append, e.g., new goog.string.StringBuffer('foo', 'bar').

Instance Methods

Public Protected Private
append(a1opt_a2var_args) !goog.string.StringBuffer
Appends one or more items to the buffer. Calling this with null, undefined, or empty arguments is an error.
Arguments:
a1 : *
Required first string.
opt_a2 : *=
Optional second string.
var_args : ...*
Other items to append, e.g., sb.append('foo', 'bar', 'baz').
Returns: !goog.string.StringBuffer  This same StringBuffer object.
code »
clear()
Clears the internal buffer.
code »
getLength() number
No description.
Returns: number  the length of the current contents of the buffer.
code »
set(s)
Sets the contents of the string buffer object, replacing what's currently there.
Arguments:
s : *
String to set.
code »
toString() string
No description.
Returns: string  The concatenated string.
code »

Instance Properties

buffer_ :
Internal buffer for the string to be concatenated.
Code »

Package string

Package Reference