< Summary

Information
Class: ArturRios.Util.RegularExpressions.RegexExtensions
Assembly: ArturRios.Util
File(s): D:\Repositories\dotnet-util\src\RegularExpressions\RegexExtensions.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 17
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 1
Fully covered methods: 1
Total methods: 1
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Remove(...)100%11100%

File(s)

D:\Repositories\dotnet-util\src\RegularExpressions\RegexExtensions.cs

#LineLine coverage
 1using System.Text.RegularExpressions;
 2
 3namespace ArturRios.Util.RegularExpressions;
 4
 5/// <summary>
 6/// Extension helpers for <see cref="Regex"/> operations.
 7/// </summary>
 8public static class RegexExtensions
 9{
 10    /// <summary>
 11    /// Removes all matches of the provided <see cref="Regex"/> from <paramref name="string"/>.
 12    /// </summary>
 13    /// <param name="regex">The regex whose matches will be removed.</param>
 14    /// <param name="string">Input text.</param>
 15    /// <returns>The input text with all matches replaced by an empty string.</returns>
 516    public static string Remove(this Regex regex, string @string) => regex.Replace(@string, string.Empty);
 17}