From b424a4b8ecbf564affa7fde975ccd4cf6dfbe0c6 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 20 Oct 2020 14:59:02 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20string.Reverse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- X10D/src/StringExtensions.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/X10D/src/StringExtensions.cs b/X10D/src/StringExtensions.cs index d722cd2..93920a1 100644 --- a/X10D/src/StringExtensions.cs +++ b/X10D/src/StringExtensions.cs @@ -258,6 +258,16 @@ return builder.ToString(); } + /// + /// Reverses the current string. + /// + /// The string to reverse. + /// A whose characters are that of in reverse order. + public static string Reverse(this string value) + { + return string.Join(string.Empty, Enumerable.Reverse(value)); + } + /// /// Shuffles the characters in the string. ///