Skip to content

Commit

Permalink
Merge branch '2.x' into 3.x
Browse files Browse the repository at this point in the history
* 2.x:
  Tweak previous commit
  [Documentation] Add note about simple string matching
  • Loading branch information
fabpot committed Apr 9, 2022
2 parents 321c5cb + ab36653 commit b4d6723
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,7 @@ Comparisons
The following comparison operators are supported in any expression: ``==``,
``!=``, ``<``, ``>``, ``>=``, and ``<=``.

You can also check if a string ``starts with`` or ``ends with`` another
string:
Check if a string ``starts with`` or ``ends with`` another string:

.. code-block:: twig
Expand All @@ -649,6 +648,9 @@ string:
{% if 'Fabien' ends with 'n' %}
{% endif %}
Check that a string contains another string via the containment operator (see
next section).

.. note::

For complex string comparisons, the ``matches`` operator allows you to use
Expand Down

0 comments on commit b4d6723

Please sign in to comment.