mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
parent
5fb6f7bea7
commit
7c56c8d571
@ -61,16 +61,6 @@ public static class StringExtensions
|
|||||||
return Regex.Replace(me, $"^{clearStr}", string.Empty);
|
return Regex.Replace(me, $"^{clearStr}", string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 去掉尾部字符串“Async”
|
|
||||||
/// </summary>
|
|
||||||
#pragma warning disable RCS1047, ASA002, VSTHRD200
|
|
||||||
public static string TrimPrefixAsync(this string me)
|
|
||||||
#pragma warning restore VSTHRD200, ASA002, RCS1047
|
|
||||||
{
|
|
||||||
return TrimPrefix(me, "Async");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 去掉尾部字符串
|
/// 去掉尾部字符串
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -79,11 +69,21 @@ public static class StringExtensions
|
|||||||
return Regex.Replace(me, $"{clearStr}$", string.Empty);
|
return Regex.Replace(me, $"{clearStr}$", string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 去掉尾部字符串“Async”
|
||||||
|
/// </summary>
|
||||||
|
#pragma warning disable RCS1047, ASA002, VSTHRD200
|
||||||
|
public static string TrimSuffixAsync(this string me)
|
||||||
|
#pragma warning restore VSTHRD200, ASA002, RCS1047
|
||||||
|
{
|
||||||
|
return TrimSuffix(me, "Async");
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 去掉尾部字符串“Options”
|
/// 去掉尾部字符串“Options”
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string TrimSuffixOptions(this string me)
|
public static string TrimSuffixOptions(this string me)
|
||||||
{
|
{
|
||||||
return TrimPrefix(me, "Options");
|
return TrimSuffix(me, "Options");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user