[Modify] Move it
This commit is contained in:
parent
2935c8e1cf
commit
08f15dcee3
@ -911,6 +911,19 @@ namespace WebSocketSharp.Net
|
|||||||
return UrlDecode (s, Encoding.UTF8);
|
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)
|
public static string UrlDecode (string s, Encoding encoding)
|
||||||
{
|
{
|
||||||
if (s == null)
|
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 (
|
public static string UrlDecode (
|
||||||
byte[] bytes, int offset, int count, Encoding encoding
|
byte[] bytes, int offset, int count, Encoding encoding
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user