Module ringo/buffer
Buffer (parts...)
A utility class for composing strings. This is implemented as a simple wrapper around a JavaScript array.
Parameters
| parts... | initial parts to write to the buffer |
Buffer.prototype.digest (algorithm)
Get a message digest on the content of this buffer.
Parameters
| algorithm | the algorithm to use, defaults to MD5 |
Buffer.prototype.forEach (fn)
Call function fn with each content part in this buffer.
Parameters
| fn | a function to apply to each buffer part |
Buffer.prototype.reset ()
Reset the buffer discarding all its content.
Buffer.prototype.toString ()
Return the content of this buffer as string.
Buffer.prototype.write (parts...)
Append all arguments to this buffer.
Parameters
| parts... | the parts to write to the buffer |
Buffer.prototype.writeln (parts...)
Append all arguments to this buffer terminated by a carriage return/newline sequence.
Parameters
| parts... | the parts to write to the buffer |
