[Modify] Polish it

This commit is contained in:
sta 2018-09-03 20:37:47 +09:00
parent 61f96f36a1
commit ddb794b3b5

View File

@ -1204,9 +1204,10 @@ namespace WebSocketSharp.Net
public static string UrlEncodeUnicode (string s)
{
return s != null && s.Length > 0
? Encoding.ASCII.GetString (InternalUrlEncodeUnicodeToBytes (s))
: s;
if (s == null || s.Length == 0)
return s;
return Encoding.ASCII.GetString (InternalUrlEncodeUnicodeToBytes (s));
}
public static byte[] UrlEncodeUnicodeToBytes (string s)