8000 Add documentation for new reverse() method · symfony/symfony-docs@9a4d9cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a4d9cd

Browse files
committed
Add documentation for new reverse() method
1 parent d838ba6 commit 9a4d9cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

components/string.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,19 @@ Methods to Join, Split and Truncate
358358
// breaks the string into pieces of the length given as argument
359359
u('0123456789')->chunk(3); // ['012', '345', '678', '9']
360360

361+
.. versionadded:: 5.1
362+
363+
The reverse() method was introduced in Symfony 5.1.
364+
365+
Method to Reverse
366+
~~~~~~~~~~~~~~~~~
367+
368+
::
369+
370+
// reverses the order of characters in a string
371+
u('foo bar')->reverse(); // 'rab oof'
372+
u('さよなら')->reverse(); // 'らなよさ'
373+
361374
Methods Added by ByteString
362375
~~~~~~~~~~~~~~~~~~~~~~~~~~~
363376

0 commit comments

Comments
 (0)
0