Class Index | File Index

Classes


Class M.StringBuilder


Extends M.Object.
The string builder is a utility object to join multiple strings to one single string.
Defined in: string_builder.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
An array containing all strings used within this string builder.
 
The type of this object.
Method Summary
Method Attributes Method Name and Description
 
append(value, count)
This method appends the given string, 'value', to its internal list of strings.
 
This method clears the string builders internal string list.
 
create(str)
This method creates a new string builder instance.
 
This method returns a single string, consisting of all previously appended strings.
Methods borrowed from class M.Object:
bindToCaller, destroy, extend, get, include, set
Class Detail
M.StringBuilder()
Field Detail
{Array} strings
An array containing all strings used within this string builder.

{String} type
The type of this object.
Method Detail
{Boolean} append(value, count)
This method appends the given string, 'value', to its internal list of strings. With an additional parameter 'count', you can force this method to add the string multiple times.
Parameters:
{String} value
The value of the string to be added.
{Number} count
The number to specify how many times the string will be added.
Returns:
{Boolean} The result of this operation: success/YES, error/NO.

clear()
This method clears the string builders internal string list.

create(str)
This method creates a new string builder instance.
Parameters:
{String} str
The initial string for this string builder.

{String} toString()
This method returns a single string, consisting of all previously appended strings. They are concatenated in the order they were appended to the string builder.
Returns:
{String} The concatenated string of all appended strings.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 25 2012 20:41:10 GMT+0100 (MEZ)