mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-11-04 21:20:50 +08:00 
			
		
		
		
	@@ -61,16 +61,6 @@ public static class StringExtensions
 | 
			
		||||
        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>
 | 
			
		||||
@@ -79,11 +69,21 @@ public static class StringExtensions
 | 
			
		||||
        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>
 | 
			
		||||
    ///     去掉尾部字符串“Options”
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public static string TrimSuffixOptions(this string me)
 | 
			
		||||
    {
 | 
			
		||||
        return TrimPrefix(me, "Options");
 | 
			
		||||
        return TrimSuffix(me, "Options");
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user