[Modify] Move it

This commit is contained in:
sta 2019-01-13 21:18:26 +09:00
parent 2935c8e1cf
commit 08f15dcee3

View File

@ -911,6 +911,19 @@ namespace WebSocketSharp.Net
return UrlDecode (s, Encoding.UTF8);
}
public static string UrlDecode (byte[] bytes, Encoding encoding)
{
if (bytes == null)
throw new ArgumentNullException ("bytes");
var len = bytes.Length;
return len > 0
? (encoding ?? Encoding.UTF8).GetString (
urlDecodeToBytes (bytes, 0, len)
)
: String.Empty;
}
public static string UrlDecode (string s, Encoding encoding)
{
if (s == null)
@ -925,19 +938,6 @@ namespace WebSocketSharp.Net
);
}
public static string UrlDecode (byte[] bytes, Encoding encoding)
{
if (bytes == null)
throw new ArgumentNullException ("bytes");
var len = bytes.Length;
return len > 0
? (encoding ?? Encoding.UTF8).GetString (
urlDecodeToBytes (bytes, 0, len)
)
: String.Empty;
}
public static string UrlDecode (
byte[] bytes, int offset, int count, Encoding encoding
)