Closed JBGruber closed 11 months ago
URLs are funny and have a crazy amount of corner cases. I think this is more stable:
ada_get_basename <- function(x) {
protocol <- adaR::ada_get_protocol(x)
host <- adaR::ada_get_hostname(x)
paste0(protocol,"//",host)
}
I put it on the agenda for 0.3 to add this function
@JBGruber will go to CRAN today or tomorrow
Probably a fringe use case, but the other day I tried to read the HTML data from the root of a website and though
ada_get_domain
would get me there.Unfortunatly, the domain is recognised as local path without the protocol. Would be fantastic if there was a function to get to the base name. This is roughly the behaviour I would expect.
Created on 2023-10-05 with reprex v2.0.2
Thanks for considering!