Class AjxBuffer
Object
|
+--AjxBuffer
- class
AjxBuffer
Use this class to implement an efficient String Buffer.
It is especially useful for assembling HTML.
Useage:
1) For a small amount of text, call it statically as:
AjxBuffer.concat("a", 1, "b", this.getFoo(), ...);
2) Or create an instance and use that to assemble a big pile of HTML:
var buffer = new AjxBuffer();
buffer.append("foo", myObject.someOtherFoo(), ...);
...
buffer.append(fooo.yetMoreFoo());
return buffer.toString()
It is useful (and quicker!) to create a single buffer and then pass that to subroutines
that are doing assembly of HTML pieces for you.
Note that in both modes you can pass as many arguments you like to the
methods -- this is quite a bit faster than concatenating the arguments
with the + sign (eg: don't do buffer.append("a" + b.foo()); )
Defined in AjxBuffer.js
Author: Owen Williams
Field Summary |
<static> Object |
append
|
append
<static> Object append
AjxBuffer
AjxBuffer()
append
void append()
clear
void clear()
join
Object join(delim)
set
void set(str)
toString
Object toString()
concat
<static> Object concat()
Documentation generated by
JSDoc on Thu Apr 27 13:58:41 2006