-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export clear functions #57
Comments
these are actually |
similar issue as with #15 @chainsawriot do you think this is a viable way for ada_clear_* and ada_set_*? or is there a shortcut? ada_string ada_clear_port1(ada_url url) noexcept {
ada::result<ada::url_aggregator>& r = get_instance(url);
if (!r) {
return ada_string_create(NULL, 0);
}
r->clear_port();
std::string_view out = r->get_href();
return ada_string_create(out.data(), out.length());
} |
@schochastics There should be a way to do that without rewriting |
std::string Rcpp_clear_port(String s) {
std::string_view input(s.get_cstring());
ada_url url = ada_parse(input.data(), input.length());
ada_clear_port(url);
std::string res = charsub(ada_get_href(url));
ada_free(url);
return res;
} Not vectorize, but proof of concept. |
@chainsawriot I think I get it. Do you mind if I implement this, or do you want to do this yourself? |
@schochastics Please do that. |
https://github.com/schochastics/adaR/blob/main/src/ada/ada.cpp#L15116-L15148
The text was updated successfully, but these errors were encountered: