From 08f15dcee3a1d6f4e8606d9196eaf81205575a61 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 13 Jan 2019 21:18:26 +0900 Subject: [PATCH] [Modify] Move it --- websocket-sharp/Net/HttpUtility.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index c05482f1..f427da7b 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -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 )