Skip to content

Commit 26daf4f

Browse files
new: Convert.Reverse available
1 parent 60e637a commit 26daf4f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Convert.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ namespace CSSimpleFunctions
44
{
55
public class Convert
66
{
7+
public static string Reverse(string str)
8+
{
9+
string temp = string.Empty;
10+
for (int a = str.Length - 1; a > -1; a--)
11+
{
12+
temp += str.ElementAt(a);
13+
}
14+
return temp;
15+
}
16+
717
public static string ToBase64(string str)
818
{
919
return System.Convert.ToBase64String(Encoding.UTF8.GetBytes(str));

0 commit comments

Comments
 (0)