diff --git a/csharp/Lib/Utils/StringUtils.cs b/csharp/Lib/Utils/StringUtils.cs index 774706efe..284d43cf8 100644 --- a/csharp/Lib/Utils/StringUtils.cs +++ b/csharp/Lib/Utils/StringUtils.cs @@ -375,6 +375,11 @@ public static class StringUtils { return $"{prefix}{target.TrimStart(prefix)}"; } + + public static String EnsureEndsWith(this String target, String postfix) + { + return $"{target.TrimEnd(postfix)}{postfix}"; + } } \ No newline at end of file