mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 10:56:38 +00:00
Adding mb_strlen
This commit is contained in:
@@ -12,8 +12,12 @@ it will return the length of the string provided by that method.
|
|||||||
|
|
||||||
For objects that implement the ``Traversable`` interface, ``length`` will use the return value of the ``iterator_count()`` method.
|
For objects that implement the ``Traversable`` interface, ``length`` will use the return value of the ``iterator_count()`` method.
|
||||||
|
|
||||||
|
For strings, `mb_strlen()`_ is used.
|
||||||
|
|
||||||
.. code-block:: twig
|
.. code-block:: twig
|
||||||
|
|
||||||
{% if users|length > 10 %}
|
{% if users|length > 10 %}
|
||||||
...
|
...
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
.. _mb_strlen(): https://www.php.net/manual/function.mb-strlen.php
|
||||||
|
|||||||
Reference in New Issue
Block a user