You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.4KB

  1. # Generated by using Rcpp::compileAttributes() -> do not edit by hand
  2. # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
  3. #' Return the apex/top-private domain from a vector of domains
  4. #'
  5. #' @md
  6. #' @param domains character vector of domains
  7. #' @return character vector
  8. #' @export
  9. apex_domain <- function(domains) {
  10. .Call('_psl_apex_domain', PACKAGE = 'psl', domains)
  11. }
  12. #' Return the public suffix from a vector of domains
  13. #'
  14. #' @md
  15. #' @param domains character vector of domains
  16. #' @return character vector
  17. #' @export
  18. public_suffix <- function(domains) {
  19. .Call('_psl_public_suffix', PACKAGE = 'psl', domains)
  20. }
  21. #' Test whether a domain is a public suffix
  22. #'
  23. #' @md
  24. #' @param domains character vector of domains
  25. #' @return character vector
  26. #' @export
  27. is_public_suffix <- function(domains) {
  28. .Call('_psl_is_public_suffix', PACKAGE = 'psl', domains)
  29. }
  30. #' Separate a domain into component parts
  31. #'
  32. #' @md
  33. #' @param domains character vector of domains
  34. #' @return data frame
  35. #' @export
  36. suffix_extract <- function(domains) {
  37. .Call('_psl_suffix_extract', PACKAGE = 'psl', domains)
  38. }
  39. #' Separate a domain into component parts (`urltools` compatibility function)
  40. #'
  41. #' Compatibility function for those using `urltools::suffix_extract()`
  42. #'
  43. #' @md
  44. #' @param domains character vector of domains
  45. #' @return data frame
  46. #' @export
  47. suffix_extract2 <- function(domains) {
  48. .Call('_psl_suffix_extract2', PACKAGE = 'psl', domains)
  49. }