private curl_escape ( String url, int length ) : |
||
url | String | |
length | int | |
return |
/// <summary> /// URL encode a String. /// </summary> /// <param name="url">The string to URL encode.</param> /// <param name="length"> /// Input string length; /// use 0 for cURL to determine. /// </param> /// <returns>A new URL encoded string.</returns> /// <exception cref="System.InvalidOperationException"> /// Thrown if cURL isn't properly initialized. /// </exception> public static string Escape(string url, int length) { EnsureCurl(); var p = NativeMethods.curl_escape(url, length); var s = Marshal.PtrToStringAnsi(p); NativeMethods.curl_free(p); return(s); }