public string TrimStartOnce(string input, string startsWith) { string result = CommonStringExtensions.TrimStartOnce(input, startsWith); PexAssert.IsNotNull(result); PexAssert.IsTrue(result.Length <= input.Length); int originalStartsWithCount = CommonStringExtensions.CountSubstringStart(input, startsWith); int resultStartsWithCount = CommonStringExtensions.CountSubstringStart(result, startsWith); PexAssert.IsTrue(originalStartsWithCount - resultStartsWithCount <= 1); return(result); }