Catel.IO.Path.RemoveTrailingSlashes C# (CSharp) Метод

RemoveTrailingSlashes() статический приватный Метод

Removes any slashes (\ or /) at the end of the string.
The is null or whitespace.
static private RemoveTrailingSlashes ( string value ) : string
value string Value to remove the slashes from.
Результат string
        internal static string RemoveTrailingSlashes(string value)
        {
            Argument.IsNotNullOrWhitespace("value", value);

            while ((value.Length > 0) && ((value[value.Length - 1] == '\\') || (value[value.Length - 1] == '/')))
            {
                value = value.Remove(value.Length - 1, 1);
            }

            return value;
        }