See the original description in utils::URLencode. Argument repeated is backported.

URLencode(URL, reserved = FALSE, repeated = FALSE)

Examples

# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_URLencode = getFromNamespace("URLencode", "backports")

URLdecode(z <- "ab%20cd")
#> [1] "ab cd"
c(bp_URLencode(z), bp_URLencode(z, repeated = TRUE))
#> [1] "ab%20cd"   "ab%2520cd"