PageRenderTime 16ms CodeModel.GetById 14ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/src/tests/erlydtl/docroot/filters

https://code.google.com/p/zotonic/
#! | 45 lines | 28 code | 17 blank | 0 comment | 0 complexity | 0b4a2c60653defb1fea8ed83830eb8fc MD5 | raw file
 1Add: 2 + 2 = {{ 2 + 2 }}
 2
 3Capfirst: {{ "capitalized"|capfirst }}
 4
 5Centered:
 6<pre>
 7{{ "center"|center:20 }}
 8</pre>
 9
10Date format:  {{ date_var1|date:"r" }}
11DateTime format: {{ datetime_var1|date:"r" }}
12
13Escape JS: {{ "\" '"|escapejs }}
14
15First letter: {{ "first"|first }}
16
17Fix ampersands: {{ "&"|fix_ampersands }}
18
19Force_escape: {{ "<b></b>"|force_escape }}
20
21Joined: {{ list|join:", " }}
22
23Last: {{ "last"|last }}
24
25Length: {{ list|length }}
26
27Length is 2?: {{ list|length_is:2 }}
28
29Left adjust: 
30<pre>
31{{ "left"|ljust:20 }}
32</pre>
33
34Line breaks: {{ "Line 1\nLine 2\nLine 3"|linebreaksbr }}
35
36Lowercase: {{ "LOWERCASE"|lower }}
37
38Right adjust:
39<pre>
40{{ "right"|rjust:20 }}
41</pre>
42
43Uppercase: {{ "uppercase"|upper }}
44
45URL Encode: {{ "Let's go!"|urlencode }}