-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the silent conversion approach fix #66
- Loading branch information
1 parent
0ac03d0
commit 94fa964
Showing
13 changed files
with
288 additions
and
352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
#' Use ada-url to parse a url | ||
#' @param url character. one or more URL to be parsed | ||
#' @param decode logical. Whether to decode the output (see [utils::URLdecode()]), default to `TRUE` | ||
#' @param to_unicode logical. Whether to convert the output to unicode. default | ||
#' is TRUE | ||
#' @details For details on the returned components refer to the introductory vignette. | ||
#' @return A data frame of the url components: | ||
#' href, protocol, username, password, host, hostname, port, pathname, search, and hash | ||
#' @examples | ||
#' ada_url_parse("https://user_1:[email protected]:8080/dir/../api?q=1#frag") | ||
#' @export | ||
ada_url_parse <- function(url, decode = TRUE, to_unicode = TRUE) { | ||
ada_url_parse <- function(url, decode = TRUE) { | ||
if (is.null(url)) { | ||
return(structure(list( | ||
href = character(0), protocol = character(0), | ||
|
@@ -18,7 +16,7 @@ ada_url_parse <- function(url, decode = TRUE, to_unicode = TRUE) { | |
search = character(0), hash = character(0) | ||
), row.names = integer(0), class = "data.frame")) | ||
} | ||
Rcpp_ada_parse(url, decode, to_unicode) | ||
Rcpp_ada_parse(url, decode) | ||
} | ||
|
||
#' Function to percent-decode characters in URLs | ||
|
Oops, something went wrong.