CSharp examples for System:String Strip
Trim End
using System.Text.RegularExpressions; using System.Text; using System.Net; using System.Linq; using System.Globalization; using System.Collections.Generic; using System;/*from w w w. j a va 2 s .com*/ public class Main{ public static string TrimEnd(this string input, string trimString) { var result = input; while (result.EndsWith(trimString)) result = result.Substring(0, result.Length - trimString.Length); return result; } }