Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions components/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,19 @@ Methods to Join, Split and Truncate
// breaks the string into pieces of the length given as argument
u('0123456789')->chunk(3); // ['012', '345', '678', '9']

.. versionadded:: 5.1

The reverse() method was introduced in Symfony 5.1.

Method to Reverse
~~~~~~~~~~~~~~~~~

::

// reverses the order of characters in a string
u('foo bar')->reverse(); // 'rab oof'
u('さよなら')->reverse(); // 'らなよさ'

Methods Added by ByteString
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down