Skip to content

Add documentation for new reverse() method #12865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2020
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