Mercurial > silverbladetech
annotate Stocks/Stocks.Common/Core/ExtensionMethods.cs @ 9:904a9faadf8b
change to .hgignore
author | stevenh7776 stevenhollidge@hotmail.com |
---|---|
date | Tue, 21 Feb 2012 17:07:03 +0700 |
parents | e5d46bb6cdb0 |
children |
rev | line source |
---|---|
0 | 1 using System; |
2 | |
3 namespace Stocks.Common.Core | |
4 { | |
5 public static class StringHelper | |
6 { | |
7 /// <summary> | |
8 /// Receives string and returns the string with its letters reversed. | |
9 /// </summary> | |
10 public static string Reverse(this string s) | |
11 { | |
12 if (s == null) return null; | |
13 char[] arr = s.ToCharArray(); | |
14 Array.Reverse(arr); | |
15 return new string(arr); | |
16 } | |
17 } | |
18 } |