From 9a4d9cdbaab623b52da8945e22b74b14819744fe Mon Sep 17 00:00:00 2001 From: Matthieu Lempereur Date: Sun, 29 Dec 2019 00:14:30 +0100 Subject: [PATCH] Add documentation for new reverse() method --- components/string.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/components/string.rst b/components/string.rst index 068f7fc02a2..dc49c565f31 100644 --- a/components/string.rst +++ b/components/string.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~