mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
* BTCPay Server Extensions  * cleanup * fix * Polish UI a bit,detect when docker deployment
18 lines
516 B
C#
18 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;
|
|
}
|
|
}
|
|
}
|