index
:
cpp-web.git
C++ web blog software, made for my special needs.
log msg
author
committer
range
blog.impl.cc
master
about
summary
refs
log
tree
commit
diff
path:
root
/
src
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Toni Uhlig <matzeton@googlemail.com>
2021-11-11 17:09:40 +0100
committer
Toni Uhlig <matzeton@googlemail.com>
2021-11-11 17:09:40 +0100
commit
cb3a3ba618b33247d1be61d7aa6e9f3de628b876
(
patch
)
tree
2d15ce16cc9029f26645184cfb5a79bf4ee7e853
/
src
parent
95f17c2ae374efa9e17f132950b29f00d0fbc0ab
(
diff
)
Inja callback "itoa".
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat
(limited to 'src')
-rw-r--r--
src/TemplateManager.cpp
6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/TemplateManager.cpp b/src/TemplateManager.cpp
index ff14610..025ceb8 100644
--- a/
src/TemplateManager.cpp
+++ b/
src/TemplateManager.cpp
@@ -13,6 +13,12 @@ TemplateManager::TemplateManager()
return true;
});
/*
+ * itoa(convertable);
+ */
+ AddInjaCallback("itoa", 1, [](inja::Arguments & args) {
+ return std::to_string(args.at(0)->get<int>());
+ });
+ /*
* indent(input: str, width: int, first: bool, blank: bool);
*/
AddInjaCallback("indent", 4, [](inja::Arguments & args) {