From: Seb Minderhoud Date: Thu, 19 Jun 2014 07:49:36 +0000 (+0200) Subject: Update slice.rst X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=87165e7ea5c1d29d38f824c5d6de90d63e31daff;p=web%2Fkonrad%2Ftwig.git Update slice.rst --- diff --git a/doc/filters/slice.rst b/doc/filters/slice.rst index c76c61c..afc8300 100644 --- a/doc/filters/slice.rst +++ b/doc/filters/slice.rst @@ -41,7 +41,7 @@ As syntactic sugar, you can also use the ``[]`` notation: {{ '12345'[2:] }} {# will display "345" #} The ``slice`` filter works as the `array_slice`_ PHP function for arrays and -`substr`_ for strings. +`mb_substr`_ for strings with a fallback to `substr`_. If the start is non-negative, the sequence will start at that start in the variable. If start is negative, the sequence will start that far from the end @@ -67,4 +67,5 @@ Arguments .. _`Traversable`: http://php.net/manual/en/class.traversable.php .. _`array_slice`: http://php.net/array_slice +.. _`mb_substr` : http://php.net/mb-substr .. _`substr`: http://php.net/substr