btcpayserver/BTCPayServer/Extensions/StringExtensions.cs
Andrew Camilleri 1440e8c55d
BTCPay Server Extensions (#1925)
* BTCPay Server Extensions

![demo](https://i.imgur.com/2S00aL2.gif)

* cleanup

* fix

* Polish UI a bit,detect when docker deployment
2020-10-15 21:28:09 +09:00

19 lines
516 B
C#

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;
}
}
}