Catel.IO.Path.RemoveTrailingSlashes C# (CSharp) Method

RemoveTrailingSlashes() static private method

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