Gets the right side of the string.
//Microsoft Public License (Ms-PL) //http://visualizer.codeplex.com/license using System; using System.Collections.Generic; namespace Redwerb.BizArk.Core.StringExt { /// <summary> /// Provides extension methods for strings. /// </summary> public static class StringExt { /// <summary> /// Gets the right side of the string. /// </summary> /// <param name="str"></param> /// <param name="length"></param> /// <returns></returns> public static string Right(this string str, int length) { if (str == null) return null; if (str.Length <= length) return str; return str.Substring(str.Length - length); } } }
String