annotate MetroWpf/Stocks.Common/Core/ExtensionMethods.cs @ 96:188f8b366e87

Unit test project correctly setup as normal class library DLL.
author stevenhollidge <stevenhollidge@hotmail.com>
date Sat, 05 May 2012 13:29:56 +0100
parents 6109bc268b90
children
rev   line source
20
adminsh@apollo
parents:
diff changeset
1 using System;
adminsh@apollo
parents:
diff changeset
2
adminsh@apollo
parents:
diff changeset
3 namespace Stocks.Common.Core
adminsh@apollo
parents:
diff changeset
4 {
adminsh@apollo
parents:
diff changeset
5 public static class StringHelper
adminsh@apollo
parents:
diff changeset
6 {
adminsh@apollo
parents:
diff changeset
7 /// <summary>
adminsh@apollo
parents:
diff changeset
8 /// Receives string and returns the string with its letters reversed.
adminsh@apollo
parents:
diff changeset
9 /// </summary>
adminsh@apollo
parents:
diff changeset
10 public static string Reverse(this string s)
adminsh@apollo
parents:
diff changeset
11 {
adminsh@apollo
parents:
diff changeset
12 if (s == null) return null;
adminsh@apollo
parents:
diff changeset
13 char[] arr = s.ToCharArray();
adminsh@apollo
parents:
diff changeset
14 Array.Reverse(arr);
adminsh@apollo
parents:
diff changeset
15 return new string(arr);
adminsh@apollo
parents:
diff changeset
16 }
adminsh@apollo
parents:
diff changeset
17 }
adminsh@apollo
parents:
diff changeset
18 }