About rhai-url
This crate provides url::Url access for the Rhai scripting language.
Usage
Cargo.toml
[]
= "0.0.5"
Rhai script
// create a new Url
let url = ;
// get the absolute url as a string
; // print 'http://example.com/?q=query'
; // print 'http://example.com/?q=query'
// get the url query string, without the leading ?
; // print 'q=query'
// get the url fragment
; // print ''
// hash is an alias of fragment
; // print ''
// clear the query
url.;
; // print ''
// remove a query key
url.;
// query_remove with no arguments will clear the query string
url.;
// adds a query key value pair into the query string
url.;
You can see an example on how to use those function in the tests.
Rust source
use ;
use Package;
use UrlPackage;
use Url;
Features
| Feature | Default | Description |
|---|---|---|
array |
enabled | Enables support for Rhai Array |
metadata |
disabled | Enables support for generating package documentation |