Mercurial > silverbladetech
annotate MetroWpf/Stocks.Common/Core/ExtensionMethods.cs @ 61:9de81c9ad319
extra files
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sat, 21 Apr 2012 21:20:05 +0100 |
parents | 6109bc268b90 |
children |
rev | line source |
---|---|
20 | 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 } |