Skip to content

Commit 84af922

Browse files
authored
Update README.md
1 parent e66205d commit 84af922

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ std::string source = R"(
2222
{{ ("Hello", 'world') | join }}!!!
2323
{{ ("Hello", 'world') | join(', ') }}!!!
2424
{{ ("Hello", 'world') | join(d = '; ') }}!!!
25+
{{ ("Hello", 'world') | join(d = '; ') | lower }}!!!
2526
)";
2627

2728
Template tpl;
@@ -35,6 +36,7 @@ produces the result string:
3536
Helloworld!!!
3637
Hello, world!!!
3738
Hello; world!!!
39+
hello; world!!!
3840
```
3941

4042
# Getting started
@@ -84,7 +86,7 @@ enum Animals
8486
};
8587
```
8688

87-
And you want to automatically produce string to enum and enum to string convertor. Like this:
89+
And you want to automatically produce string-to-enum and enum-to-string convertor. Like this:
8890

8991
```c++
9092
inline const char* AnimalsToString(Animals e)
@@ -338,11 +340,11 @@ In this cases method 'jinja2::reflect' reflects regular C++ type into jinja2 tem
338340
# Current Jinja2 support
339341
Currently, Jinja2Cpp supports the limited number of Jinja2 features. By the way, Jinja2Cpp is planned to be full [jinja2 specification](http://jinja.pocoo.org/docs/2.10/templates/)-conformant. The current support is limited to:
340342
- expressions. You can use almost every style of expressions: simple, filtered, conditional, and so on.
341-
- limited number of filters (**join**, **sort**, **default**)
342-
- limited number of testers (**defined**, **startsWith**)
343+
- big number of filters (**sort, default, first, last, length, max, min, reverse, unique, sum, attr, map, reject, rejectattr, select, selectattr, pprint, dictsort, abs, float, int, list, round, random, trim, title, upper, wordcount, replace, truncate, groupby, urlencode**)
344+
- big number of testers (**eq, defined, ge, gt, iterable, le, lt, mapping, ne, number, sequence, string, undefined, in, even, odd, lower, upper**)
343345
- limited number of functions (**range**, **loop.cycle**)
344346
- 'if' statement (with 'elif' and 'else' branches)
345-
- 'for' statement (with 'else' branch support)
347+
- 'for' statement (with 'else' branch and 'if' part support)
346348
- 'set' statement
347349

348350
# Supported compilers
@@ -439,3 +441,10 @@ target_link_libraries(YourTarget
439441
)
440442
#...
441443
```
444+
445+
# New in version 0.6
446+
* A lot of filters has been implemented. Full set of supported filters listed here: https://github.com/flexferrum/Jinja2Cpp/issues/7
447+
* A lot of testers has been implemented. Full set of supported testers listed here: https://github.com/flexferrum/Jinja2Cpp/issues/8
448+
* 'Contatenate as string' operator ('~') has been implemented
449+
* For-loop with 'if' condition has been implemented
450+
* Fixed some bugs in parser

0 commit comments

Comments
 (0)