mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
updated doc
git-svn-id: http://svn.twig-project.org/trunk@209 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
@@ -750,6 +750,9 @@ but exists for completeness' sake. The following operators are supported:
|
||||
|
||||
* `%`: Calculate the remainder of an integer division. `{{ 11 % 7 }}` is `4`.
|
||||
|
||||
* `//`: Divide two numbers and return the truncated integer result. `{{ 20 //
|
||||
7 }}` is `2`.
|
||||
|
||||
* `*`: Multiply the left operand with the right one. `{{ 2 * 2 }}` would
|
||||
return `4`. This can also be used to repeat a string multiple times. `{{
|
||||
'=' * 80 }}` would print a bar of 80 equal signs.
|
||||
@@ -846,14 +849,6 @@ otherwise:
|
||||
[twig]
|
||||
{{ var|odd ? 'odd' : 'even' }}
|
||||
|
||||
### `floor`
|
||||
|
||||
The `floor` filter divides two numbers and return the truncated integer
|
||||
result
|
||||
|
||||
[twig]
|
||||
{{ 20|floor(7) }} {# returns 2 #}
|
||||
|
||||
### `encoding`
|
||||
|
||||
The `encoding` filter URL encode a given string.
|
||||
|
||||
Reference in New Issue
Block a user