aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/twig/twig/doc/functions/range.rst
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twig/twig/doc/functions/range.rst')
-rw-r--r--vendor/twig/twig/doc/functions/range.rst45
1 files changed, 0 insertions, 45 deletions
diff --git a/vendor/twig/twig/doc/functions/range.rst b/vendor/twig/twig/doc/functions/range.rst
deleted file mode 100644
index b1fa5471..00000000
--- a/vendor/twig/twig/doc/functions/range.rst
+++ /dev/null
@@ -1,45 +0,0 @@
1``range``
2=========
3
4Returns a list containing an arithmetic progression of integers:
5
6.. code-block:: jinja
7
8 {% for i in range(0, 3) %}
9 {{ i }},
10 {% endfor %}
11
12 {# returns 0, 1, 2, 3 #}
13
14When step is given (as the third parameter), it specifies the increment (or
15decrement):
16
17.. code-block:: jinja
18
19 {% for i in range(0, 6, 2) %}
20 {{ i }},
21 {% endfor %}
22
23 {# returns 0, 2, 4, 6 #}
24
25The Twig built-in ``..`` operator is just syntactic sugar for the ``range``
26function (with a step of 1):
27
28.. code-block:: jinja
29
30 {% for i in 0..3 %}
31 {{ i }},
32 {% endfor %}
33
34.. tip::
35
36 The ``range`` function works as the native PHP `range`_ function.
37
38Arguments
39---------
40
41 * ``low``: The first value of the sequence.
42 * ``high``: The highest possible value of the sequence.
43 * ``step``: The increment between elements of the sequence.
44
45.. _`range`: http://php.net/range