mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-28 19:17:37 +00:00
Clarify docs for the u filter
This commit is contained in:
+3
-8
@@ -18,6 +18,9 @@ Wrapping a text to a given number of characters:
|
||||
Twig
|
||||
= <3
|
||||
|
||||
Here, ``u`` is the filter and ``wordwrap(5)`` is a method called on the result
|
||||
of the filter; it's equivalent to ``(text|u).wordwrap(5)``.
|
||||
|
||||
Truncating a string:
|
||||
|
||||
.. code-block:: twig
|
||||
@@ -56,14 +59,6 @@ You can also chain methods:
|
||||
TWIG
|
||||
= <3
|
||||
|
||||
For large strings manipulation, use the ``apply`` tag:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
{% apply u.wordwrap(5) %}
|
||||
Some large amount of text...
|
||||
{% endapply %}
|
||||
|
||||
.. note::
|
||||
|
||||
The ``u`` filter is part of the ``StringExtension`` which is not installed
|
||||
|
||||
Reference in New Issue
Block a user