I need this all the time and am constantly frustrated that the Trim(), TrimStart() and TrimEnd() functions don\'t take strings as inputs. You call EndsWith() on a string, an
This is what you object to having to do?
if (theString.endsWith(theOtherString)) { theString = theString.Substring(0, theString.Length - theOtherString.Length); }