view Stocks/Stocks.Common/Core/ExtensionMethods.cs @ 98:d0c2cac12376

Latest version
author stevenhollidge <stevenhollidge@hotmail.com>
date Sat, 05 May 2012 22:53:40 +0100
parents e5d46bb6cdb0
children
line wrap: on
line source

using System;

namespace Stocks.Common.Core
{
  public static class StringHelper
  {
    /// <summary>
    /// Receives string and returns the string with its letters reversed.
    /// </summary>
    public static string Reverse(this string s)
    {
      if (s == null) return null;
      char[] arr = s.ToCharArray();
      Array.Reverse(arr);
      return new string(arr);
    }
  }
}