[Modify] Polish it
This commit is contained in:
parent
bb44ff169c
commit
36b74f63ad
@ -1106,12 +1106,15 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
public static string UrlEncode (byte[] bytes)
|
public static string UrlEncode (byte[] bytes)
|
||||||
{
|
{
|
||||||
int len;
|
if (bytes == null)
|
||||||
return bytes == null
|
return null;
|
||||||
? null
|
|
||||||
: (len = bytes.Length) == 0
|
var len = bytes.Length;
|
||||||
? String.Empty
|
return len > 0
|
||||||
: Encoding.ASCII.GetString (InternalUrlEncodeToBytes (bytes, 0, len));
|
? Encoding.ASCII.GetString (
|
||||||
|
InternalUrlEncodeToBytes (bytes, 0, len)
|
||||||
|
)
|
||||||
|
: String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string UrlEncode (string s)
|
public static string UrlEncode (string s)
|
||||||
|
Loading…
Reference in New Issue
Block a user