Function urlparse::quote_plus [] [src]

pub fn quote_plus<S: AsRef<str>>(
    s: S,
    safe: &[u8]
) -> Result<String, FromUtf8Error>

Like quote(), but also replaces ' ' with '+', as required for quoting HTML form values.

Examples

use urlparse::quote_plus;

let s = quote_plus("a - b = 123", b"");
assert_eq!(s.ok().unwrap(), "a+-+b+%3D+123");