public static byte[] UrlEncodeToBytes(string str, Encoding e) { if (str == null) { return(null); } byte[] bytes = e.GetBytes(str); return(HttpEncoder.UrlEncode(bytes, 0, bytes.Length, alwaysCreateNewReturnValue: false)); }
public static byte[] UrlEncodeToBytes(byte[] bytes, int offset, int count) => HttpEncoder.UrlEncode(bytes, offset, count, alwaysCreateNewReturnValue: true);
public static byte[] UrlEncodeToBytes(byte[] bytes, int offset, int count) { return(HttpEncoder.UrlEncode(bytes, offset, count, true /* alwaysCreateNewReturnValue */)); }