[Modify] Polish it

This commit is contained in:
sta 2018-09-06 19:49:42 +09:00
parent bb44ff169c
commit 36b74f63ad

View File

@ -1106,12 +1106,15 @@ namespace WebSocketSharp.Net
public static string UrlEncode (byte[] bytes)
{
int len;
return bytes == null
? null
: (len = bytes.Length) == 0
? String.Empty
: Encoding.ASCII.GetString (InternalUrlEncodeToBytes (bytes, 0, len));
if (bytes == null)
return null;
var len = bytes.Length;
return len > 0
? Encoding.ASCII.GetString (
InternalUrlEncodeToBytes (bytes, 0, len)
)
: String.Empty;
}
public static string UrlEncode (string s)