Add string.Reverse

This commit is contained in:
Oliver Booth 2020-10-20 14:59:02 +01:00
parent 1601084cb4
commit b424a4b8ec
1 changed files with 10 additions and 0 deletions

View File

@ -258,6 +258,16 @@
return builder.ToString();
}
/// <summary>
/// Reverses the current string.
/// </summary>
/// <param name="value">The string to reverse.</param>
/// <returns>A <see cref="string" /> whose characters are that of <paramref name="value" /> in reverse order.</returns>
public static string Reverse(this string value)
{
return string.Join(string.Empty, Enumerable.Reverse(value));
}
/// <summary>
/// Shuffles the characters in the string.
/// </summary>