Helma logo
helma.org » Home > Stories > res.pop()

res.pop()

Pops a string buffer from the response object and returns its string value.

This function "pops" a string buffer from the response object to which which has been pushed there via res.push(). This function returns a string that contains all output written to the response since the corresponding res.push() was called.

Note that more than one string buffers can be pushed on the response object, and output always goes to the last one.

Syntax
res.pop()

Example
res.push();
res.write("foo");
res.encode('.');
res.write("bar");
var str = res.pop()
// str is "foo.bar"


... comment


Page last modified on 2003-11-14 16:30 by rist