Class StringBuffer

Object
   |
   +--StringBuffer

class StringBuffer

This class can be used to create a string from multiple substrings. It seems to be faster then creating a string the following way:

var s = " mary " + "had " + "a " + "little " + "lamb";


Field Summary
 var text
          
 
Constructor Summary
StringBuffer ()
           
 
Method Summary
 function clear()
           Clears the string buffer.
 function toString()
           Returns a string representation of the string buffer content.
 function write(str)
           Appends a string to the string buffer.

Field Detail

text

var text

Constructor Detail

StringBuffer

function StringBuffer()

Method Detail

clear

function clear()
Clears the string buffer.


toString

function toString()
Returns a string representation of the string buffer content.

Returns:
The string buffer content.

write

function write(str)
Appends a string to the string buffer.

Parameters:
str - String to append.