Exemple #1
0
        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));
        }
Exemple #2
0
 public static byte[] UrlEncodeToBytes(byte[] bytes, int offset, int count) => HttpEncoder.UrlEncode(bytes, offset, count, alwaysCreateNewReturnValue: true);
Exemple #3
0
 public static byte[] UrlEncodeToBytes(byte[] bytes, int offset, int count)
 {
     return(HttpEncoder.UrlEncode(bytes, offset, count, true /* alwaysCreateNewReturnValue */));
 }