Skip to content

Commit

Permalink
Update Extensions.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Oct 15, 2023
1 parent 2ef7af1 commit 7eceea5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/Verify/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,6 @@ public static void RemoveEmptyLines(this StringBuilder builder)
public static string Remove(this string value, string toRemove) =>
value.Replace(toRemove, "");

public static string RemoveLast(this string value, string pattern)
{
var place = value.LastIndexOf(pattern, StringComparison.OrdinalIgnoreCase);

if (place == -1)
{
return value;
}

return value.Remove(place, pattern.Length);
}

public static void ReplaceIfLonger(this StringBuilder builder, string oldValue, string newValue)
{
if (builder.Length < oldValue.Length)
Expand Down

0 comments on commit 7eceea5

Please sign in to comment.