summaryrefslogtreecommitdiff
path: root/include/call.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-23 21:15:26 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-23 21:15:26 +0100
commit41396949abf0bdc861db0cb477056306e47facfb (patch)
tree809976cd83074da122cf2e5d85e66ae3a276e3e2 /include/call.h
parent68441d448e377f9a61af5c29c793922fff0d9328 (diff)
added echo() function requested in issue #51
Diffstat (limited to 'include/call.h')
-rw-r--r--include/call.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/call.h b/include/call.h
index d71c077..0ef6353 100644
--- a/include/call.h
+++ b/include/call.h
@@ -46,6 +46,8 @@ Value call(const char *name, Params&&... params)
*/
inline Value array_keys(const Value &value) { return call("array_keys", value); }
inline Value array_values(const Value &value) { return call("array_values", value); }
+inline Value echo(const char *input) { out << input; return nullptr; }
+inline Value echo(const std::string &input) { out << input; return nullptr; }
inline Value empty(const Value &value) { return value.isNull() || !value.boolValue(); }
inline Value empty(const HashMember<std::string> &member) { return !member.exists() || empty(member.value()); }
inline Value empty(const HashMember<int> &member) { return !member.exists() || empty(member.value()); }