mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
BTCPay Server Extensions (#1925)
* BTCPay Server Extensions  * cleanup * fix * Polish UI a bit,detect when docker deployment
This commit is contained in:
18
BTCPayServer/Extensions/StringExtensions.cs
Normal file
18
BTCPayServer/Extensions/StringExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace BTCPayServer
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static string TrimEnd(this string input, string suffixToRemove,
|
||||
StringComparison comparisonType)
|
||||
{
|
||||
if (input != null && suffixToRemove != null
|
||||
&& input.EndsWith(suffixToRemove, comparisonType))
|
||||
{
|
||||
return input.Substring(0, input.Length - suffixToRemove.Length);
|
||||
}
|
||||
else return input;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user