mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
C#10ify
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace CliFx.Analyzers.Utils.Extensions
|
||||
{
|
||||
internal static class StringExtensions
|
||||
{
|
||||
public static string TrimEnd(
|
||||
this string str,
|
||||
string sub,
|
||||
StringComparison comparison = StringComparison.Ordinal)
|
||||
{
|
||||
while (str.EndsWith(sub, comparison))
|
||||
str = str.Substring(0, str.Length - sub.Length);
|
||||
namespace CliFx.Analyzers.Utils.Extensions;
|
||||
|
||||
return str;
|
||||
}
|
||||
internal static class StringExtensions
|
||||
{
|
||||
public static string TrimEnd(
|
||||
this string str,
|
||||
string sub,
|
||||
StringComparison comparison = StringComparison.Ordinal)
|
||||
{
|
||||
while (str.EndsWith(sub, comparison))
|
||||
str = str.Substring(0, str.Length - sub.Length);
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user