[Modify] Add it

This commit is contained in:
sta 2017-06-12 15:46:39 +09:00
parent a4235be063
commit 2c531b6288

View File

@ -895,6 +895,12 @@ namespace WebSocketSharp
return ret.Length > 0 ? ret : "/";
}
internal static string TrimSlashOrBackslashFromEnd (this string value)
{
var ret = value.TrimEnd ('/', '\\');
return ret.Length > 0 ? ret : value[0].ToString ();
}
/// <summary>
/// Tries to create a new <see cref="Uri"/> for WebSocket with
/// the specified <paramref name="uriString"/>.